Introduction to 3D Graphics and VRML

[ Previous | Index | Next ]


Transformation (cont...)

Rotation

  • Pitch, rotation around X axis
  • Yaw, rotation around Y axis
  • Roll, rotation around Z axis
  • Euler Anges
    • R(X,Y,Z), where X,Y,Z are angles (usually in degrees or radians)
  • Quaternions
    • R(X,Y,Z,theta), where X,Y,Z is a vector and theta is the angle

VRML Rotation Example

#VRML V1.0 ascii

Material  { diffuseColor 1   0   0    }
Rotation  { rotation     0   1   1  2 } # Quaternion
Cube      { depth 2 height 2 width 2  }

Author: Michael Louka (mlouka@sn.no)
Last Updated: 19 November 1996