Creates a VRML surface plot based on PV-WAVE variables.
x
y
Title
Transform
XTitle
YTitle
ZTitle
NOTE: The x, y, z data are scaled into a unit cube, so that the axes for the graphic fall within the range of 0 to 1 for all three axes. Use Transform to move the cube around, stretch it, and so on.
x = FINDGEN(21) - 10.0 x = x # REPLICATE(1, 21) y = TRANSPOSE(x); Create 2D arrays of x- and y-coordinates.
z = x * SIN(y) + y * COS(x); Evaluate a function of x and y for the surface.
VRML_OPEN, 'vrml_surf.wrl'; Open the VRML file.
VRML_CAMERA, [1, -3, 1], $ LookAt=[.5, .5, .5]; Set an initial viewpoint.
VRML_SURFACE, z, x, y, ZTitle = 'f(x, y)', $ Title = 'f(x, y) = x*sin(y) + y*cos(x)'; Write the surface to the VRML file.
VRML_CLOSE; Close the VRML file.