学习内容概览:
- 3D transformations
-
Viewing(观测)转换
- View/Camera transformation
- Projection(投影) transformation
- Orthographic(正交) projection
- Perspective(透视) projection
一、3D transformations
类似2D使用齐次坐标表示(点用1,向量用0):
- 3D point = \(\left(x,y,z,1\right)^T\)
- 3D vector = \(\left(x,y,z,0 \right)^T\)
通常,\((x,y,z,w)(w!=0)\)是3D的点:
\[ \begin{pmatrix} x^{'} \\ y^{'} \\ z^{'} \\ 1 \end{pmatrix} = \begin{pmatrix} a & b&c&t_x \\ d& e&f&t_y \\ g&h&i&t_z \\ 0&0&0&1 \end{pmatrix} \cdot \begin{pmatrix} x \\ y \\ z \\ 1 \end{pmatrix} \]