Modifies thelight source shading parameters affecting the output of SHADE_SURF and POLYSHADE.
Light A 3-element vector specifying the direction of the light source. The default light source vector is [0, 0, 1], with the light rays parallel to the Z axis.
Reject If set (the default), causes polygons to be rejected as being hidden if their vertices are ordered in a clockwise direction as seen by the viewer.
sphere = FLTARR(20, 20, 20)
Create a three-dimensional single precision, floating-point array.
FOR x = 0, 19 DO FOR y = 0, 19 DO FOR $ z = 0, 19 DO sphere(x, y, z) = $ SQRT((x-10)^2 + (y-10)^2 + (z-10)^2)
Create the spherical volume dataset.
SHADE_VOLUME, sphere, 7, v, p
Find the vertices and polygons at a contour level of 7.
SURFACE, FLTARR(2, 2), /Nodata, /Save, $
Xrange = [0, 20], Yrange = [0, 20], $
Zrange = [0, 20], Xstyle = 4, Ystyle = 4, $
Zstyle = 4
Set up an appropriate three-dimensional transformation.
SET_SHADING, Gouraud = 0
Turn Gouraud shading off.
image = POLYSHADE(v, p, /T3d)
Render the image.
TV, image
Display the image.
Figure 2-101 Spherical isosurface with constant intensity shading.
Figure 2-102 Spherical isosurface with constant intensity shading.
SET_SHADING, Gouraud = 1
Turn Gouraud shading on.
image = POLYSHADE(v, p, /T3d)
Render the image.
TV, image
Display the image.
Figure 2-103 Spherical isosurface with Gouraud shading.
Figure 2-104 Spherical isosurface with Gouraud shading.