vtkSURFACE Procedure
Renders a surface.
Usage
vtkSURFACE, z[,x, y]
Input Parameters
z—A two-dimensional array containing the values that describe the surface. If x and y are supplied, the surface is plotted as a function of the x and y locations specified by their contents. Otherwise, the surface is generated as a function of the array index of each element of z.
x—(optional) A vector or two-dimensional array specifying the x-coordinates for the surface.
*If x is a vector, each element of x specifies the x-coordinate for a column of z. For example, x(0) specifies the x-coordinate for z(0, *).
*If x is a two-dimensional array, each element of x specifies the x-coordinate of the corresponding point in z (xij specifies the x-coordinate for zij).
y—(optional) A vector or two-dimensional array specifying the y-coordinates for the surface.
*If y is a vector, each element of y specifies the y coordinate for a row of z. For example, y(0) specifies the y-coordinate for z (*, 0).
*If y is a two-dimensional array, each element of y specifies the y-coordinate of the corresponding point in z (yij specifies the y-coordinate for zij).
Keywords
Name—Specifies a name to be used to create this object. If an undefined variable is used or no name specified, then a random name is used. This name can be used in calls to vtkCOMMAND to modify this object.
Shades—An array expression of the same dimensions as z, containing the color index at each point. Alternately, an expression describing one color to be used for the entire surface or wireframe. If this keyword is omitted, a white surface is displayed.
To specify a single color, see the vtkWINDOW Procedure. If a two-dimensional array of colors is specified (for an image overlay), the shades variable can be in any of these formats:
*FIX(x, y)—A two-dimensional array of short integers or bytes specifying an index into the current PV-WAVE color table for each point. The RGB color for each point is obtained from the corresponding entry in the current PV-WAVE color table.
*LONG(x, y)—A two-dimensional array of long integers specifying the 24-bit color.
*FLOAT(3, x, y)—A floating point array of size (3, x, y) containing the normalized values specifying the red, green, and blue components of the color at each point.
*FLOAT(4,x) A floating point array of size (4, x, y) containing the normalized values specifying the red, green, blue, and alpha components of the color at each point. The alpha component is the transparency where 0.0 is completely transparent and 1.0 is opaque.
Wireframe—When present and nonzero, a wire-frame mesh is drawn rather than a shaded surface.
LOD—If nonzero, a level-of-detail actor is created to aid in keeping a high frame-rate during frequent render requests due to user mouse interaction. If set greater than 1, the number of points to use in the random cloud.
NoData—If nonzero, do not plot the surface. This is more convenient in many cases than to set up a set of axes using vtkAXES. Default = 0
NoRotate—Does not perform any camera rotations. Used when a previous call to vtkSURFACE, vtkSCATTER or vtkPOLYSHADE has already set the camera angle.
NoAxes—If present and non zero, then no x, y, or z axes will be drawn.
NoErase—If nonzero, prevents the window from being erased to the background color before drawing the new scene. If not set, then all lights, cameras, and objects are removed from the scene before objects for the new scene are added.
noset—If set then the user has complete control of the camera instead of the default level of assistance provided by vtkcamera.
TextColor—The color to use for text used for the axes titles. See the vtkWINDOW Procedure for possible ways to specify the color. (Default: 'white') These keywords are passed to the vtkAXES Procedure:
 
Other keywords are listed below. For a description of each keyword, see Chapter 21: Graphics and Plotting Keywords.
 
Discussion
This is similar to SURFACE and SHADE_SURF for PV‑WAVE windows. Wireframes can be produced as well as surfaces shaded in one color or overlaid with an image. Transparency is also supported.
Example
This example demonstrates a surface created in a regular PV‑WAVE window compared to one using vtkSURFACE.
; Read in the data values for elevation, snowpack, and load color
; table.
pikes=FLTARR(60,40)
s=DC_READ_FREE(!Data_Dir+'pikeselev.dat',pikes)
snow=FLTARR(60,40)
s=DC_READ_FREE(!Data_Dir+'snowpack.dat',snow)
LOADCT,5
; Create a wiremesh surface using a regular PV-WAVE window.
SURFACE,pikes
; Create a wiremesh surface using the VTK toolkit. Notice that the
; toolkit doesn’t scale the data for you so in order to make sense
; out of the resulting graphic you need to scale the data 
; yourself, in this example it was done by dividing by 250.
vtkSURFACE,pikes/250,/wireframe
; Create a shaded surface using a regular PV-WAVE window.
SHADE_SURF,pikes,shades=bytscl(snow)
; Create a shaded surface using the VTK toolkit.  As above, 
; the user does the scaling of the data.
vtkSURFACE,pikes/250,shades=bytscl(snow)
See Also