geometry8
#VRML V2.0 utf8 # Information about this scene WorldInfo { title "Simple geometry" info [ "Description: Simple geometry", "Programming by Roland Smeenk", "Last modified: 19 februari 1998", ] } # First Viewpoint Viewpoint { description "Overview camera" position 0 1 15 } # Second viewpoint Viewpoint { description "Close-up camera" position 0 0 5 orientation 0 1 0 0.2 } # The lightsource PointLight { location 10 10 10 } # Another lightsource PointLight { location -20 20 50 } # We give the box a different size by adjusting it's only possible field: # the size, the default for the size of a box is 2 2 2 Transform { translation -6 0 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Box { size 1 0.5 5 } } ] } # We can also use the Transform node for scaling the box Transform { scale 0.5 2 3 translation -3 0 0 children [ Shape { appearance Appearance { material Material { diffuseColor 0 1 0 } } geometry Box { } } ] } # We can influence the scale orientation Transform { scale 0.5 2 3 scaleOrientation 0 0 1 0.5 translation 1 0 0 children [ Shape { appearance Appearance { material Material { diffuseColor 0 0 1 } } geometry Box { } } ] } # We can also influence the rotation of the children in a Transform node Transform { translation 4 0 0 rotation 1 1 1 0.8 children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 0 } } geometry Box { } } ] }