VRML_LINE Procedure

Creates a VRML polyline object.

Usage

VRML_LINE, x, y[, z] 

Input Parameters

x, y—Each parameter is a 1D array containing npoint elements specifying the polyline coordinates.

z—(optional) A 1D array containing npoint elements, specifying a z-axis polyline coordinate. (Default: 0, a line on the x-y plane)

Keywords

Use the following keywords to set the object properties and material properties.

Object Properties

The following keywords describe or define the VRML polyline object.

Transform—A 4-by-4 matrix containing the transformation to be applied to the polyline object.

Material Properties

The following properties, when set, are applied to the line.

AmbientColor—A (3, n) array of RGB color, in the range of 0 and 255. If AmbientColor is an n-element array, then the color is interpreted as grayscale.

DiffuseColor—A (3, n) array of RGB color, in the range of 0 and 255. If DiffuseColor is an n-element array, then the color is interpreted as grayscale.

EmissiveColor—A (3, n) array of RGB color, in the range of 0 and 255. If EmissiveColor is an n-element array, then the color is interpreted as grayscale.

MaterialIndices—An array of indices into the material property arrays in the range of 0 to n – 1, relating each vertex of the polyline to the set of material properties (AmbientColor, DiffuseColor, EmissiveColor, SpecularColor, Transparency, Shininess). There should be NPOINT elements in this array (one per vertex in the polyline). (Default: n = npoint, where the set of material properties relates one-to-one to its corresponding vertices)

Shininess—An n-element array of shininess, in the range of 0 to 255.

SpecularColor—(3, n) array of RGB color, in the range of 0 to 255. If SpecularColor is an n-element array, then the color is interpreted as grayscale.

Transparency—An n-element array of transparency, in the range of 0 to 255.

Discussion

VRML_LINE draws a polyline using an IndexedLineSet node.

Example

VRML_OPEN, 'vrml_line.wrl'
x = FINDGEN(10)/9
y = RANDOMU(s, 10)
VRML_LINE, x, y 
VRML_CLOSE

See Also

PLOTS,  VRML_OPENVRML_POLY

For a discussion of VRML polylines, see The VRML Sourcebook, by Andrea L. Ames, et al., John Wiley & Sons, Inc., 1996, Chapter 14.