Overview & Affine Transformation
3D Rotation
- Cos(theta) in the matrix scaling spots
- Sin(theta) and -Sin(theta) in the matrix sheering spots
2D Rotation $$ \begin{bmatrix} Cos(Ï´) & -Sin(Ï´) \\ Sin(Ï´) & Cos(Ï´) \end{bmatrix} $$
3D Rotation $$ \begin{bmatrix} Cos(Ï´) & -Sin(Ï´) & 0 \\ Sin(Ï´) & Cos(Ï´) & 0 \\\ 0 & 0 & 1 \end{bmatrix} $$
Homogeneous Coordinates
Have an extra collumn in the transformation matrix to represent translation
2D Translation
- Move to a 3D dimension and make the third collumn in the matrix a translation vector
$$ \begin{bmatrix} x+1 \\ y \\ 0 \end{bmatrix}= \begin{bmatrix} x+1\\ y \end{bmatrix}= \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} * \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} $$