Positions a VRML cube in the world.
Center A 3-element array specifying the true center of the cube object. (Default: 0, 0, 0)
Rotation A 3-element array of values in degrees, specifying the rotation about the x, y, and z axes, respectively.
Transform A 4-by-4 matrix containing the transformation to be applied to the cube object.
Widths A scalar value applied to each of the three directions, or a 3-element array of values specifying the width in each direction (x, y, z) individually. (Default: 2.0)
AmbientColor 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.
DiffuseColor 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.
EmissiveColor 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.
Shininess Scalar shininess factor, in the range of 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.
RESTORE, 'wavelogo.dat'; Restore variables for
img
, r, g, b.
sz = SIZE(img) col = TRANSPOSE([[r], [g], [b]]) img24 = REFORM(col(*, img), 3, sz(1), sz(2)) VRML_CUBE, Center = [-5, -3, 5], $ Width = 3, Texture = img24; A cube with the wave logo on it.
VRML_CUBE, Center = [4, -2, -2], $ Rotation = [0, 0, 0], $ DiffuseColor = [127, 255, 191], $ AmbientColor = [55, 70, 60], $ SpecularColor = [0, 100, 0] VRML_CUBE, Center = [4, -2, -2], $ Rotation = [45, 0, 0], $ DiffuseColor = [127, 255, 191], $ AmbientColor = [55, 70, 60],$ SpecularColor = [0, 100, 0] VRML_CUBE,Center = [4, -2, -2], $ Rotation = [0, 45, 0], $ DiffuseColor = [127, 255, 191], $ AmbientColor = [55, 70, 60],$ SpecularColor = [0, 100, 0] VRML_CUBE,Center = [4, -2, -2], $ Rotation = [0, 0, 45], $ DiffuseColor = [127, 255, 191], $ AmbientColor = [55, 70, 60], $ SpecularColor = [0, 100, 0]; An Escher-like cube.