Polygon Shading Method

The shading applied to each polygon, defined by its four surrounding elevations, can be either constant over the entire cell or interpolated. Constant shading takes less time because only one shading value needs to be computed for the entire polygon. Interpolated shading gives smoother results. The Gouraud method of interpolation is used: the shade values are computed at each elevation point, coinciding with each polygon vertex. The shading is then interpolated along each edge, finally, between edges along each vertical scan line.

Light-source shading is computed using a combination of depth cueing, ambient light, and diffuse reflection, adapted from Foley and Van Dam, Chapter 19 (Foley, J.D., and A. Van Dam (1982), Fundamentals of Interactive Computer Graphics, Addison-Wesley Publishing Co.):

I = Ia + dIp(LN)

where

Ia

Term due to ambient light. All visible objects have at least this intensity, which is approximately 20 percent of the maximum intensity.

Ip(LN)

Term due to diffuse reflection. The reflected light is proportional to the cosine of the angle between the surface normal vector N and the vector pointing to the light source, L. Ip is approximately 0.9.

d

Term for depth cueing, causing surfaces further away from the observer to appear dimmer. The normalized depth is d=(z+2)/3, ranging from zero for the most distant point to one for the closest.

In Direct Graphics, the SET_SHADING method modifies the light source shading parameters. In Object Graphics similar OpenGL functionality is available through the SHADING property of objects such as IDLgrPolygon, IDLgrPolyline, IDLSurface and IDLgrContour.