Standard Library routine that creates a shaded-surface representation of a semiregularly gridded surface, withshading from either a light source model or from a specified array of intensities.
x
y
Max_Img_Size
Shades
Other keywords let you control many aspects of the plot's appearance. These keywords are listed in the following table. For a description of each keyword, see Chapter 3, Graphics and Plotting Keywords.
SHADE_SURF_IRR is similar to the SURFACE procedure. Given a semiregular grid of elevations, it produces a shaded surface representation of the data with hidden surfaces removed.
If the graphics output device has scalable pixels (e.g., PostScript), then the output image is scaled so that its largest dimension is less than or equal to 400. Use the Max_Img_Size keyword to increase this size.
NOTE: The NoErase keyword is ignored on devices that do not support TVRD()for example, PostScript.
CAUTION: If the T3d keyword is set, the 3D to 2D transformation matrix contained in !P.T must project the z-axis to a line parallel to the device y-axis, or errors will occur.
x = (LINDGEN(200, 100) MOD 200) / 10.0 - 10.0 y = (LINDGEN(200, 100) / 200) / 10.0 - 5.0
; Compute
x- and
y-components of a 200x100 regular grid.
x = x + (RANDOMN(seed, 200, 100) - 2.0) / 16.0 y = y + (RANDOMN(seed, 200, 100) - 2.0) / 16.0
; Build an irregular grid by perturbing the regular grid
; by a random factor.
z = x * SIN(y) + y * COS(x)
; Compute a two-dimensional array of elevations.
SHADE_SURF_IRR, z, x, y, Ax = 70
; Display the shaded surface. The
Ax
keyword is used to specify
; the angle of rotation about the
x
-axis.
Figure 2-109 Shaded surface defined in the example over irregular grid.
Figure 2-110 Shaded surface defined in the example over irregular grid.