VRML_AXIS Procedure
Adds an axis to a VRML world.
Usage
VRML_AXIS, origin[, length, range]
Input Parameters
origin—A 3-element array of coordinates specifying the axis origin.
length—(optional) The length of the axis. (Default: 1)
range—(optional) A 2-element array specifying the coordinate values defining the axis. (Default: [0, 1])
Keywords
Use the following keywords to set the object properties, material properties, font family settings, and font attributes.
Object Properties
The following keywords describe or define the VRML axis object.
Radius—Specifies the radial length of all objects of the axis. (Default: 0.01 of the length parameter)
Title—A string specifying the axis title.
Transform—A 4-by-4 matrix for rotating an axis.
 
note
If you need an axis pointing in some direction other than x, y, or z, then use the Transform keyword to rotate one of these three axes in the desired direction.
X—Adds an x-axis (the default).
Y—Adds a y-axis.
Z—Adds a z-axis.
Material Properties
The following properties, when set, are applied to all objects of an axis (cylinders, cones, cubes, spheres, and text), as applicable.
AmbientColor—3-element array of RGB color with each element ranging between 0 and 255. Scalar values are interpreted as grayscale.
DiffuseColor—3-element array of RGB color with each element ranging between 0 and 255. Scalar values are interpreted as grayscale.
EmissiveColor—3-element array of RGB color with each element ranging between 0 and 255. Scalar values are interpreted as grayscale.
Shininess—Scalar shininess factor.
SpecularColor—3-element array of RGB color with each element ranging between 0 and 255. Scalar values are taken as grayscale.
Transparency—Scalar transparency factor, in the range of 0 to 255.
Font Family Settings
These three font attributes are mutually exclusive.
Serif—Serif font (the default).
Sans—Sans-serif font.
Typewriter—Monospaced font.
Font Attributes
Either or both of these keywords may be used. If neither is set, then the typeface is “normal.”
Bold—Boldface type.
Italic—Italic type.
Discussion
The VRML_AXIS procedure has no direct correlation with a VRML predefined type. This procedure produces a combination of a cylinder (the axis body), a cone (the axis arrowhead), and text (the axis range and titles).
Example
; Start the VRML file and create a default axis.
VRML_OPEN, 'vrml_axis.wrl'
VRML_AXIS, Title = 'Default Axis'
; Make a Y axis, starting at a different origin.
VRML_AXIS, [1, 0, 0], 3, [-100, 200], /Y, Radius = .05, $
   Title = 'Testing Y -Sans - Italic Axis', /Sans, /Italic
; Make a Z axis, with a material list.
VRML_AXIS, [0, 0, 0], 3, /Z, Title = 'Testing Z Axis', $
   DiffuseColor = [127, 255, 191], AmbientColor = [55, 70, 60], $
   EmissiveColor = [200, 100, 50], Transparency = 120, $
   Specular = [10, 10, 10], /Bold, /TypeWriter
VRML_CLOSE
See Also
For a discussion of VRML primitives and color parameter definitions, see The VRML Sourcebook, by Andrea L. Ames, et al., John Wiley & Sons, Inc., 1996, Chapter 3.