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(L • N)
where
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.