计算机图形学1. 三维空间矩阵变换
计算机图形学1. 矩阵变换
平移变换
\[\left[\begin{array}{c} 1 & & & t_x\\ & 1 & & t_y\\ & & 1 & t_z\\ & & & 1\\ \end{array}\right] \left[\begin{array}{c} x \\ y \\ z \\ 1 \end{array}\right] = \left[\begin{array}{c} x + t_x \\ y + t_y \\ z + t_z \\ 1 \end{array}\right]\]
旋转变换
\[\left[\begin{array}{c} cos\theta & -sin\theta & 0 & 0\\ sin\theta & cos\theta & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ \end{array}\right] \left[\begin{array}{c} x \\ y \\ z \\ 1 \end{array}\right] = \left[\begin{array}{c} x\cos\theta - y\sin\theta \\ x\sin\theta + y\cos\theta \\ z \\ 1 \end{array}\right]\]
缩放变换
\[\left[\begin{array}{c} s_x & & & 0\\ & s_y & & 0\\ & & s_z & 0\\ & & & 1\\ \end{array}\right] \left[\begin{array}{c} x \\ y \\ z \\ 1 \end{array}\right] = \left[\begin{array}{c} s_xx \\ s_yy \\ s_zz \\ 1 \end{array}\right]\]
计算机图形学1. 三维空间矩阵变换
https://simonkimi.githubio.io/2024/08/12/计算机图形学1-矩阵变化/