Translation & Rotation
A discussion of 4x4 matrices in the context of a 3D application.
1. Transformations
Transformations are an important part of every 3D application. This knol discusses the different types of transformations and what you can do with them.The most important transformations you will encounter are :
- World transformation
: change the scale, translation and rotation of an object. The
transformation can be the result of a concatenation (multiplication) of
several transformation matrices. A world transformation is usually a
unique transformation for each 3D object in the scene.
- View transformation : This transformation is used to transform the entire scene. The transformation transforms all the vertices and expresses them in a new local axis that is defined by the camera, with the camera position as origin, the direction the camera is looking at as z-vector and the up vector of the camera as y-vector. (x-vector can be derived from the cross product of z & y vector). Usually the same view transformation is applied to all the objects in the scene.
- Projection transformation : Can add a perspective projection to the scene or an orthogonal projection. This transformation uses homogenous coordinates.
- Aligning an object with the camera (object is always in the same relative position from the camera)
- A hierarchy of transformations can be used to transform objects with parent child relationships (for example the rotation of a steering wheel in a moving car)