A surface object represents a shaded or vector representation of a mesh grid.
An IDLgrSurface object is an atomic graphic object ; it is one of the basic drawable elements of the IDL Object Graphics system, and it is not a container for other objects.
The IDLgrSurface:: Cleanup procedure method performs all cleanup on the object. IDLgrSurface is described above.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
The IDLgrSurface:: GetCTM function method returns the 4 x 4 graphics transform matrix from the current object upward through the graphics tree. IDLgrSurface is described above.
Set this keyword to the object reference of a destination object to specify that the projection matrix for the View object in the current tree be included in the returned transformation matrix. The resulting matrix will transform a point in the data space of the object on which the GetCTM method is called into a normalized coordinate system (-1 to +1 in X, Y, and Z), relative to the View object that contains the surface object.
Set this keyword equal to the object reference to an IDLgrModel object to specify that the returned matrix accumulate from the object on which the GetCTM method is called up to and including the specified model object.
The IDLgrSurface:: GetProperty procedure method retrieves the value of a property or group of properties for the surface. IDLgrSurface is described above.
Any keyword to IDLgrSurface::Init
Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.
Set this keyword equal to a named variable that will contain an object reference to the object that contains this object.
Set this keyword equal to a named variable that will contain a two-element vector of the form [ xmin , xmax ] that specifies the range of x data coordinates covered by the graphic object.
The IDLgrSurface:: Init function method initializes the surface object. IDLgrSurface is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Obj = OBJ_NEW('IDLgrSurface' [, Z [ , X , Y]] )
Result =
Obj
->
[IDLgrSurface::]
Init(
[Z, [X, Y]]
) (
In a subclass' Init method only
.)
The two-dimensional array to be displayed. If X and Y are provided, the surface is defined as a function the ( X , Y ) locations specified by their contents. Otherwise, the surface is generated as a function of the array indices of each element of Z . This argument is converted to single-precision floating-point.
A vector or two-dimensional array specifying the X coordinates of the grid. If this argument is a vector, each element of X specifies the X coordinate for a column of Z (e.g., 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 ( X ij specifies the X coordinate for Z ij ). This argument is converted to single-precision floating-point.
A vector or two-dimensional array specifying the Y coordinates of the grid. If this argument is a vector, each element of Y specifies the Y coordinate for a row of Z (e.g., 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 ( Y ij specifies the Y coordinate for Z ij ). This argument is converted to single-precision floating-point.
Properties retrievable via IDLgrSurface::GetProperty
The color value used to draw the bottom surface. If not specified, or set to a negative scalar value, the bottom is drawn with the same color as the top. Setting a bottom color is only supported when the destination device uses RGB color mode.
Set this keyword to the color to be used as the foreground color for this model. The color may be specified as a color lookup table index or as an RGB vector. The default is [255, 255, 255].
Set this keyword to a vector or a two-dimensional array specifying the X coordinates of the surface grid. This keyword is the same as the X argument described above.
Set this keyword to a vector or a two-dimensional array specifying the Ycoordinates of the surface grid. This keyword is the same as the Y argument described above.
Set this keyword to the two-dimensional array to display as a surface. This keyword is the same as the Z argument described above.
Set this keyword to draw point and wireframe surfaces using hidden line (point) removal. By default, hidden line removal is disabled.
Set this keyword to indicate the line style that should be used to draw the surface lines. The value can be either an integer value specifying a pre-defined line style, or a two-element vector specifying a stippling pattern.
To use a pre-defined line style, set the LINESTYLE property equal to one of the following integer values:
To define your own stippling pattern, specify a two-element vector [ repeat , bitmask ], where repeat indicates the number of times consecutive runs of 1's or 0's in the bitmask should be repeated. (That is, if three consecutive 0's appear in the bitmask and the value of repeat is 2, then the line that is drawn will have six consecutive bits turned off.) The value of repeat must be in the range 1 £ repeat £ 255.
The bitmask indicates which pixels are drawn and which are not along the length of the line. Bitmask is most conveniently specified as a 16-bit hexadecimal value.
For example,
LINESTYLE = [2, 'F0F0'X]
describes a dashed line (8 bits on, 8 bits off, 8 bits on, 8 bits off).
The maximum value to be plotted. If this keyword is present, data values greater than the value of MAX_VALUE are treated as missing and are not plotted when the surface is drawn. Note that the IEEE floating-point value NaN is also treated as missing data.
The minimum value to be plotted. If this keyword is present, data values less than the value of MIN_VALUE are treated as missing and are not plotted. Note that the IEEE floating-point value NaN is also treated as missing data.
Set this keyword equal to a string containing the name associated with this object. The default is the null string, ' '.
Set this keyword to treat the data provided via one of the DATA[XYZ] properties as a new data set unique to this object, rather than overwriting data that is shared by other objects. There is no reason to use this keyword if the object on which the property is being set does not currently share data with another object (that is, if the SHARE_DATA property is not in use). This keyword has no effect if no new data is provided via a DATA property.
Set this keyword to a two-element array that specifies the range of pixel values (color indices) to use for shading. The first element is the color index for the darkest pixel. The second element is the color element for the brightest pixel. This value is ignored when the polygons are drawn to a graphics destination that uses the RGB color model.
Set this keyword to an integer representing the type of shading to use if STYLE is set to 2 (Filled) or 6 (LegoFilled).
Gouraud shading may be slower than flat shading, but results in a smoother appearance.
Set this keyword to an object whose data is to be shared by this surface. A surface may only share data with another surface. The SHARE_DATA property is intended for use when data values are not set via an argument to the object's Init method or by setting the object's DATA property.
Set this keyword to enable skirt drawing. The default is to disable skirt drawing.
Set this keyword to the Z value at which a skirt is to be defined around the array. The Z value is expressed in data units; the default is 0.0. If a skirt is defined, each point on the four edges of the surface is connected to a point on the skirt which has the given Z value, and the same X and Y values as the edge point. In addition, each point on the skirt is connected to its neighbor. The skirt value is ignored if skirt drawing is disabled (see SHOW_SKIRT above).
Set this keyword to and integer value that indicates the style to be used to draw the surface. Valid values are:
A 2 x n array of surface coordinate-texturemap coordinate pairs [ s , t ] at each vertex., containing the fill pattern array subscripts of each of the n polygon vertices. Use this keyword in conjunction with the TEXTURE_MAP keyword to warp images over the surface. To stretch (or shrink) the texture map to cover the surface mesh completely, set TEXTURE_COORD to a scalar. By default, TEXTURE_COORD is set equal to [0.0, 0.0] to [1.0, 1.0] over the surface bounds.
Texture coordinates are normalized. This means that the m x n image object specified via the TEXTURE_MAP property is mapped into the range [0.0, 0.0] to [1.0, 1.0]. If texture coordinates outside the range [0.0, 0.0] to [1.0, 1.0] are specified, the image object is tiled into the larger range.
For example, suppose the image object specified via TEXTURE_MAP is a 256 x 256 array, and we want to map the image into a square two units on each side. To completely fill the square with a single copy of the image:
TEXTURE_COORD = [[0,0], [1,0], [1,1], [0,1]]
Set this keyword to a nonzero value to indicate that bilinear sampling is to be used with texture mapping. The default method is nearest-neighbor sampling.
Set this keyword to an instance of the IDLgrImage object class to be texture mapped onto the surface. If this keyword is omitted or set to a null object reference, no texture map is applied and the surface is filled with the color specified by the COLOR or VERT_COLORS property. If both TEXTURE_MAP and COLORS or VERT_COLORS properties exist, the color of the texture is modulated by the base color of the object. (This means that for the clearest display of the texture image, the COLOR property should be set equal to [255,255,255].) By default, the texture map will be stretched (or shrunk) to cover the surface mesh completely.
Set this keyword to an integer value between 1 and 10, specifying the line thickness to use to draw surface lines, in pixels. The default is one pixel.
Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.
Set this keyword to a vector of colors to be used to draw at each vertex. Color is interpolated between vertices if SHADING is set to 1 (Gouraud). If there are more vertices than elements in VERT_COLORS, the elements of VERT_COLORS are cyclically repeated. By default, the polygons are all drawn in the single color provided by the COLOR keyword. If this keyword is omitted or set to a scalar, vertex colors are removed and the surface is drawn in the color specified by the COLOR keyword.
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert X coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized X = s 0 + s 1 * Data X
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Y coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized Y = s 0 + s 1 * Data Y
The IDLgrSurface:: SetProperty procedure method sets the value of a property or group of properties for the surface. IDLgrSurface is described above.
Any keyword to IDLgrSurface::Init