Introduction to 3D Graphics and VRML

[ Previous | Index | Next ]


Transformation

A Transformation node is a kind of grouping node that is used to translate, rotate and scale its children

Translation

  • Used to position an object by specifying its location relative to a fixed point
  • Denoted as T(X,Y,Z)

VRML Translation Example

#VRML V2.0 utf8
Group {
  children [
 
    ...
  
    Transform {
      translation 2.0 2.0 0.0
      children [
        Shape {
          appearance Appearance {
            material Material {
              diffuseColor 1.0 0.0 0.0
            }
          }
          geometry Box {
          size 2.0 2.0 2.0
          }
        }
      ]
    }
  ]
}


Author: Michael Louka (Michael.Louka@of.telia.no)
Last Updated: 31 October 1997