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 A two-dimensional array specifying the x-coordinates for the contour surface. Each element of x specifies the x-coordinate of the corresponding point in z (xij specifies the x-coordinate for zij).
y A two-dimensional array specifying the y-coordinates for each elevation. Each element of y specifies the y-coordinate of the corresponding point in z (yij specifies the y-coordinate for zij).
Max_Img_Size For devices with scalable pixels (e.g., postscript), this keyword sets the largest allowed image size created internally to render the shaded surface. Larger values will result in a better quality image but at a cost of greater memory use and larger file size. The mimimum value is 100 (100x100), which will generally result in a poor-quality image. (Default: 400)
Shades An array expression, of the same dimensions as z, containing the color index at each point. The shading of each pixel is interpolated from the surrounding Shades values. For most displays, this parameter should be scaled into the range of bytes. If this keyword is omitted, light source shading is used.
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.