Math‎ > ‎


Transforms are ways to transform coordinate spaces with matrices. The most common ones is scale, rotation and translation aka as SRT. To support the translation use a matrix one order larger then the dimension you work in. So in 2D a 3x3 matrix is used and in 3D a 4x4 matrix. The matrix is a grid of numbers like this.

Xx Xy Xz 0
Yx Yy Yz 0
Zx Zy Zz 0
Ox Oy Oz 1

In the matrix the (Ox, Oy, Oz) is the origin or position of the object. The rotation is given by the three base axis, (Xx, Xy, Xz) is the X vector, (Yx, Yy, Yz) is the Y vector and (Zx, Zy, zz) is the Z vector. It is common to call the X the 'right side', Y for 'up' and Z is 'forward'. When a position is multiplied with the transform the position will be transformed into transforms coordinate system or space.

A vector space is number of linear independent (base) vectors. In 3D there are three of these and they can be scaled and added to obtain all other vectors in the space.

Model Space

World Space

View Space / Camera Space

Projection Space

To perform transformations between different spaces matrices are used. These are the standard names for the matrices that transform between certain vector spaces. For a matrix that only contain SRT operations one can make a inverse matrix that transform the opposite way.

Model Matrix : Model Space -> World Space

View Matrix : World Space -> View Space

Projection Matrix : View Space -> Projection Space
The two projections are perspective and orthographic.
Transform direction/position/vector