Creates a VRML cone.
Center A 3-element array specifying the true center of the cone object. (Default: 0, 0, 0)
Height Specifies the cone height (Default: 2.0)
Orientation A 3-element array specifying the orientation of the cone (in the direction of the apex). (Default: cone axis orientation along y, with the apex at +y)
Radius Specifies the radius of the cone base from the y-axis. (Default: 1.0)
Transform A 4-by-4 matrix containing the transformation to be applied to the cone object; similar to !P.T.
AmbientColor A 3-element array of RGB color with each element ranging between 0 to 255. If the value is scalar, then the color is interpreted as grayscale.
DiffuseColor A 3-element array of RGB color with each element ranging between 0 to 255. If the value is scalar, then the color is interpreted as grayscale.
EmissiveColor A 3-element array of RGB color with each element ranging between 0 to 255. If the value is scalar, then the color is interpreted as grayscale.
Shininess Scalar shininess factor, in the range from 0 to 255.
SpecularColor A 3-element array of RGB color with each element ranging between 0 and 255. If the value is scalar, then the color is interpreted as grayscale.
Texture_Image A texture image to apply to the object. The image is wrapped completely around the object. The texture image values and transparency values lie in the range of 0 to 255.
There are four options:
(2, w, h) Grayscale in (0, *, *) plus transparency in (1, *, *)
(3, w, h) True color image (red, green, blue)
(4, w, h) True color plus transparency in (3, *, *)
'wavelogo.dat'
file used in this example is found in the following directory:
wavedir/demo/web/vrml
wavedir:[DEMO.WEB.VRML]
wavedir\demo\web\vrml
wavedir
is the main PV-WAVE directory.
VRML_OPEN, 'vrml_cone.wrl' x = [0, 1, 2, 3, 4] y = [0, 1, 0, 1, 0] z = [4, 3, 2, 1, 0] RESTORE, 'wavelogo.dat' ; img, r, g, b sz = SIZE(img) col = TRANSPOSE([[r], [g], [b]]) img24 = REFORM(col(*, img), 3, sz(1), sz(2)); Create texture.
VRML_CONE; Create the default cone.
VRML_CONE,Center = [0, 3, 0], Radius = .4, $ Height = 4.0, Texture = img24; Create the textured cone.
VRML_CONE,Center = [2, 0, 0],$ Radius = 1.4, $ Height = 1.2, $ DiffuseColor = [127, 255, 191], $ AmbientColor = [55, 70, 60], $ SpecularColor = [0, 100, 0]; Create a colorful cone.
VRML_CLOSE