\mathbf{A}\vec{x}+\vec{y} =
\begin{bmatrix}
\mathbf{A} & \vec{y} \\
\vec{0}^T & 1
\end{bmatrix}
\begin{bmatrix}
\vec{x} \\
1
\end{bmatrix} =
\begin{bmatrix}
\mathbf{A}\vec{x} + \vec{y} \\
1
\end{bmatrix}
|
Affine transformation of point x |
\vec{v} = P_0 - P_1=
\begin{bmatrix}\vec{x}_0 \\ 1\end{bmatrix}-\begin{bmatrix}\vec{x}_1 \\ 1\end{bmatrix} =
\begin{bmatrix}\vec{x}_0-\vec{x}_1 \\ 0\end{bmatrix},
\begin{bmatrix}
\mathbf{A} & \vec{y} \\
\vec{0}^T & 1
\end{bmatrix}
\begin{bmatrix}
\vec{v} \\
0
\end{bmatrix} =
\begin{bmatrix}
\mathbf{A}\vec{v} \\
0
\end{bmatrix}
|
Affine transformation of vector v, where v is difference between 2 points |
\begin{bmatrix}
\mathbf{A} & \vec{y} \\
\vec{0}^T & 1
\end{bmatrix}^{-1} =
\begin{bmatrix}
\mathbf{A}^{-1} & -\mathbf{A}^{-1}\vec{y} \\
\vec{0}^T & 1
\end{bmatrix}
|
Affine transformation inverse |
\begin{bmatrix}
1 & 0 & 0 & tx \\
0 & 1 & 0 & ty \\
0 & 0 & 1 & tz \\
0 & 0 & 0 & 1
\end{bmatrix} =
\begin{bmatrix}
\mathbf{I} & \vec{t} \\
\vec{0}^T & 1
\end{bmatrix}
|
Translation affine matrix (only affects points). |
\begin{bmatrix}
1 & 0 & 0 & -tx \\
0 & 1 & 0 & -ty \\
0 & 0 & 1 & -tz \\
0 & 0 & 0 & 1
\end{bmatrix} =
\begin{bmatrix}
\mathbf{I} & -\vec{t} \\
\vec{0}^T & 1
\end{bmatrix}
|
Translation inverse |
\begin{bmatrix}
1 & 0 & 0 \\
0 & \cos\theta & -\sin\theta \\
0 & \sin\theta & \cos\theta
\end{bmatrix}
|
x-axis rotation |
\begin{bmatrix}
1 & 0 & 0 \\
0 & \cos{-\theta} & -\sin{-\theta} \\
0 & \sin{-\theta} & \cos{-\theta}
\end{bmatrix} =
\begin{bmatrix}
1 & 0 & 0 \\
0 & \cos\theta & \sin\theta \\
0 & -\sin\theta & \cos\theta
\end{bmatrix}
|
x-axis rotation inverse (= transpose) |
\begin{bmatrix}
\cos\theta & 0 & \sin\theta \\
0 & 1 & 0 \\
-\sin\theta & 0 & \cos\theta
\end{bmatrix}
|
y-axis rotation |
\begin{bmatrix}
\cos{-\theta} & 0 & \sin{-\theta} \\
0 & 1 & 0 \\
-\sin{-\theta} & 0 & \cos{-\theta}
\end{bmatrix} =
\begin{bmatrix}
\cos\theta & 0 & -\sin\theta \\
0 & 1 & 0 \\
\sin\theta & 0 & \cos\theta
\end{bmatrix}
|
y-axis rotation inverse (= transpose) |
\begin{bmatrix}
\cos\theta & -\sin\theta & 0 \\
\sin\theta & \cos\theta & 0 \\
0 & 0 & 1
\end{bmatrix}
|
z-axis rotation |
\begin{bmatrix}
\cos{-\theta} & -\sin{-\theta} & 0 \\
\sin{-\theta} & \cos{-\theta} & 0 \\
0 & 0 & 1
\end{bmatrix} =
\begin{bmatrix}
\cos\theta & \sin\theta & 0 \\
-\sin\theta & \cos\theta & 0 \\
0 & 0 & 1
\end{bmatrix}
|
z-axis rotation inverse (= transpose) |
R\vec{v} = R\vec{v}_\| + R\vec{v}_\perp =
\cos\theta\vec{v} + [1-\cos\theta](\vec{v}\bullet\hat{r})\hat{r} + \sin\theta(\hat{r}\times\vec{v}) =
[\cos\theta\mathbf{I} + (1-\cos\theta)(\hat{r}\otimes\hat{r}) + \sin\theta\tilde{r}] \vec{v} =
\begin{bmatrix}
tx^2+c & txy-sz & txz+sy \\
txy+sz & ty^2+c & tyz-sx \\
txz-sy & tyz+sx & tz^2+c
\end{bmatrix}\vec{v},
c=\cos\theta, s=\sin\theta,t=1-\cos\theta
|
general axis rotation for \vec{v}about normalized axis \hat{r}=(x,y,z) |
\begin{bmatrix}
a & 0 & 0 & 0 \\
0 & b & 0 & 0 \\
0 & 0 & c & 0 \\
0 & 0 & 0 & 1
\end{bmatrix}
|
Scaling matrix to scale x axis by a, y axis by b, z axis by c |
\begin{bmatrix}
\mathbf{I}-2(\hat{n}\otimes\hat{n}) & \vec{0} \\
\vec{0}^T & 1
\end{bmatrix}
|
Reflection matrix about normal \hat{n} |
\begin{bmatrix}
\mathbf{I}+\vec{s}\otimes\hat{n} & \vec{0} \\
\vec{0}^T & 1
\end{bmatrix}
|
Shear matrix about plane with normal \hat{n} and shear vector \vec{s} |
\vec{n}' = (\mathbf{M}^{-1})^T\vec{n}
|
transformation matrix for normal \vec{n} given point transform \mathbf{M} |
\mathbf{M} = \mathbf{TRS}
|
Usual 3d object transform order (scale, rotation, translation), ordered right-to-left |
T(P) =
\begin{bmatrix}
s\mathbf{R}\vec{x} + \vec{t} \\
1
\end{bmatrix}
|
Alternative transformation on a point P instead of 4x4 matrix, using uniform scale s, 3x3 rot matrix R, and translation t |
s' = s_1s_0, \mathbf{R}' = \mathbf{R}_1\mathbf{R}_0, \vec{t}' = \vec{t}_1 + s_1\mathbf{R}_1\vec{t}_0
|
Transform concatenation using previous representation (again instead of 4x4 matrix) |