SHADE_SURF_IRR

The SHADE_SURF_IRR procedure creates a shaded surface representation of an irregularly gridded elevation dataset.

The data must be representable as an array of quadrilaterals. This routine should be used when the ( X, Y, Z ) arrays are too irregular to be drawn by SHADE_SURF, but are still semi-regular.

This routine is written in the IDL language. Its source code can be found in the file shade_surf_irr.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

SHADE_SURF_IRR, Z, X, Y

Arguments

Z

An n x m array of elevations.

X

An n x m array containing the X location of each Z value.

Y

An n x m array containing the Y location of each Z value.

x[i,j] <= x[i+1, j] ; for all j

and

y[i,j] <= y[i, j+1] ; for all i

Keywords

AX

The angle of rotation about the X axis. The default is 30 degrees.

AZ

The angle of rotation about the Z axis. The default is 30 degrees.

IMAGE

Set this keyword to a named variable that will contain the resulting shaded surface image. The variable is returned as a byte array of the same size as the currently selected graphics device.

PLIST

Set this keyword to a named variable that will contain the polygon list on return. This feature is useful when you want to make a number of images from the same set of vertices and polygons.

T3D

Set this keyword to indicate that the generalized transformation matrix in !P.T is to be used (in which case the keyword values for AX and AZ are ignored)

Example

The following example creates a semi-regular data set in the proper format at displays the resulting irregular surface.

z = DIST(10,10)*100.0 ; Create some elevation data.

x = FLTARR(10,10) & y = FLTARR(10,10) ; Create arrays to hold X and Y data.

FOR i = 0,9 do x[0:9,i] = FINDGEN(10)

FOR j = 0,9 DO y[j,0:9] = FINDGEN(10) ; Ensure that X and Y arrays are in "clockwise" order.

x = x + RANDOMU(seed,10,10)*0.49

y = y + RANDOMU(seed,10,10)*0.49 ; Make X and Y arrays irregular.

SHADE_SURF_IRR, z, x, y ; Display the irregular surface.

See Also

SHADE_SURF , TRIGRID