Slide
3D transformations Link to heading Use homogeneous coordinates again:
3D point = $(x,y,z,1)^T$ 3D vector = $(x,y,z,0)^T$ In general, $(x,y,z,w)(w\neq0)$ is the 3D point: $(x/w,y/w,z/w)$
Use $4\times4$ matrices for affine transformations
$$ \begin{pmatrix} x'\\y'\\z'\\1 \end{pmatrix}= \begin{pmatrix} a&b&c&t_x\\d&e&f&t_u\\g&h&i&t_z\\0&0&0&1 \end{pmatrix} \cdot \begin{pmatrix} x\\y\\z\\1 \end{pmatrix} $$
Scale $$ S(s_x,s_y,s_z)=\begin{pmatrix}s_x&0&0&0\\0&s_y&0&0\\0&0&s_z&0\\0&0&0&1\end{pmatrix} $$
Translation $$ T(t_x,t_y,t_z)=\begin{pmatrix}1&0&0&t_x\\0&1&0&t_y\\0&0&1&t_z\\0&0&0&1\end{pmatrix} $$
Rotation around x-, y-, or z-axis $$ R_x(\alpha)=\begin{pmatrix}1&0&0&0\\0&\cos{\alpha}&-\sin{\alpha}&0\\0&\sin{\alpha}&\cos{\alpha}&0\\0&0&0&1\end{pmatrix} $$ $$ R_y(\alpha)=\begin{pmatrix}\cos{\alpha}&0&\sin{\alpha}&0\\0&1&0&0\\-\sin{\alpha}&0&\cos{\alpha}&0\\0&0&0&1\end{pmatrix} $$ $$ R_z(\alpha)=\begin{pmatrix}\cos{\alpha}&-\sin{\alpha}&0&0\\sin{\alpha}&\cos{\alpha}&0&0\\0&0&1&0\\0&0&0&1\end{pmatrix} $$