Constructs a surface or a solid described by a set of polygons.
3,
NVERT) of x, y, z coordinates for NVERT vertices of the polygons.plist Polygon list describing NPOLY polygons. (See the POLYSHADE function for more information about this parameter.)
Solid If set, indicates that the polygon encloses a solid.
TIP: Browser viewing efficiency is enhanced by using the Solid keyword, because the browser knows to look only at the specified inside or outside of the polygon shape instead of both.
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 polygon face to one of the set of material properties (AmbientColor, DiffuseColor, EmissiveColor, Shininess, SpecularColor, Transparency). There should be NPOLY elements in this array (one per polygon). (Default: n = NPOLY, where the set of material properties relates one-to-one to its corresponding polygon)
Shininess An n-element array of shininess, in the range of 0 to 255.
SpecularColor A (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.
VertexColor If set, MaterialIndices are per-vertex rather than per-polygon, so that the material properties describe each vertex, rather than describing each polygon.
This procedures allows for any polygonal shape to be drawn in a VRML world, with input parameters tailored to fit in with other PV-WAVE routines.
z = HANNING(14,8) * 10. POLY_SURF, z, vlist, plist; Build a vertex/polygon set from surface data.
VRML_OPEN, 'vrml_poly.wrl'; Open a VRML file.
VRML_LIGHT, [7, 4, 20] VRML_CAMERA, [0, -0, 20], LookAt = [7, 4, 0]; Set up a light source and an initial viewpoint.
r = BYTSCL(z(*)) g = BYTSCL(DIST(14, 8)) g = g(*) b = BYTSCL(INDGEN(14, 8)) b = b(*); Make up some RGB color values -- one color for each; element of z (thus, one color per polygon).
rgb = TRANSPOSE([[r], [g], [b]]); Put the colors into a (3, NPOLY) array.
VRML_POLY, vlist, plist, EmissiveColor = rgb; Write the surface to the VRML file.
VRML_CLOSE; Close the VRML file.