Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / IDL Reference / Direct Graphics / SHADE_SURF_IRR Procedure

SHADE_SURF_IRR Procedure

SHADE_SURF_IRR Procedure

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.

Examples


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

; Create some elevation data:
z = DIST(10,10)*100.0
; Create arrays to hold X and Y data:
x = FLTARR(10,10) & y = FLTARR(10,10)
; Ensure that X and Y arrays are in "clockwise" order:
FOR i = 0,9 do x[0:9,i] = FINDGEN(10)
FOR j = 0,9 DO y[j,0:9] = FINDGEN(10)
; Make X and Y arrays irregular:
x = x + RANDOMU(seed,10,10)*0.49
y = y + RANDOMU(seed,10,10)*0.49
; Display the irregular surface:
SHADE_SURF_IRR, z, x, y

Syntax


SHADE_SURF_IRR, Z, X, Y [, AX=degrees] [, AZ=degrees] [, IMAGE=variable] [, PLIST=variable] [, /T3D]

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.

The grid described by X and Y must consist of quadrilaterals, must be semi-regular, and must be in “clockwise” order. Clockwise ordering means that:

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

and

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

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)

Version History


Pre-4.0

Introduced

See Also


SHADE_SURF Procedure, TRIGRID



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us