| OCR Text |
Show 13 surface normal. The angle of refraction is the angle between the refracting ray and the surface normal. A diagram of a refracting ray is shown in Figure 6. 2.1. 7 Shading Models The ray tracer constructs a ray tree which is traversed by the shading program to compute an image. The ray tracing algorithm is separate from the shading algorithm and may be used with any one of a number of different models. The shading model shown here combines the ambient, diffuse, and specular light contributions to determine the intensity at any given intersection. The ray tree for each pix~l is then traversed calculating intensities at each point until the top of the tree is reached. At this point, the resulting intensity represents the intensity function of a pixel on the viewing screen and is stored in the image file. The shading n1odel can vary the percentage of ambient, diffuse, or specular light used in each calculation. The equations used in the shading model are shown in Figure 7. 2.1.8 Antialiasing Aliasing problems are common in image synthesis programs and are caused by undersampling. Antialiasing techniques increase the number of samples, then average the results to produce a single sample. Antialiasing is often performed in ray tracing simply by the method of "super sampling." This procedure traces multiple rays for each pixel, then averages the intensities to find the intensity of the pixel. The samples are evenly distributed over the pixel to ensure that the |