Prerequisites
Upto now we have used 3x3 matrices to represent rotations.
If you are not familiar with this subject you may like to look at the following pages first:
Combined Rotation and Translation using 4x4 matrix.
A 4x4 matrix can represent all affine transformations (including translation, rotation around origin, reflection, glides, scale from origin contraction and expansion, shear, dilation, spiral similarities). On this page we are mostly interested in representing "proper" isometries, that is, translation with rotation.
We can combine two sucsessive rotations about the origin by multiplying their matrices:
|
= |
|
* |
|
We can combine two successive translations by adding their vectors:
|
= |
|
+ |
|
So how can we represent both rotation and translation in one transform matrix?
To do this we put the rotation matrix in columns and rows 0,1 and 2, we put the translation vector in the right column, the bottom row is 0,0,0,1.
| r00 | r01 | r02 | t0 |
| r10 | r11 | r12 | t1 |
| r20 | r21 | r22 | t2 |
| 0 | 0 | 0 | 1 |
To combine subsequent transforms we multiply the 4x4 matrices together. How is this multiplication of matrices equivalent to addition of the translation vectors? To show this we can multiply two matrices representing pure translation:







