| OCR Text |
Show ATTRIBUTES = RECORD color : rgb; index : real; reflection : integer; refraction : integer; colortexture : colormapptr; normaltexture : normalmapptr; surfacetexture : surfacemapptr; END· ' Figure 4: Representation of Surface Attributes 2.1.4 Representation of Light Rays 10 An entry in the ray tree contains information about the light ray and the object it intersects. The coordinate (source.x, source.y, source.z) of the source of the ray and direction vector ( direction.x, direction.y, direction.z) describe the light ray. The intersection coordinate (intersect.x, intersect .y, intersect,z) and surface normal vector (normal.x, normal.y, norrnal.z) at the ray and object intersection are calculated and stored. The surface attributes of the intersected object are also stored. Note that if no texture mapping is performed, a pointer to the surface attributes record is all that is required. To perform texture mapping, a complete copy of the surface attributes record is needed to permit modifications based on the texture map. Pointers to the reflected and refracted rays are also included to allow multiple light rays to be linked into a ray tree. The next section of this thesis |