计算机图形学完整笔记(六):三维图形变换

第六章 三维图形变换

6.1 三维图形几何变换

6.1.1 几何变换概述

三维基本几何变换皆是相对于坐标原点和坐标轴进行的几何变换。与二维变换类似,引入齐次坐标表示,即三维空间中某点的变换可以表示成点的齐次坐标与四阶的三维变换矩阵相乘。

  • p = [ x y z 1 ] = [ x y z 1 ] [ a b c p d e f q g h i r l m n s ] p' = \left[ \begin{matrix} x^* & y^* & z^* & 1\end{matrix}\right] =\left[ \begin{matrix} x & y & z & 1 \end{matrix}\right]· \left[ \begin{matrix} a&b&c&p\\d&e&f&q\\g&h&i&r\\l&m&n&s \end{matrix} \right]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-mfjsdLeX-1597369958866)(assets/1559044604537.png)]

6.1.2 平移变换
  • [ x y z 1 ] = [ x y z 1 ] T t = [ x y z 1 ] [ 1 0 0 0 0 1 0 0 0 0 1 0 T x T y T z 1 ] = [ x + T x y + T y z + T z 1 ] \left[ \begin{matrix} x' & y' & z' & 1\end{matrix}\right]=\left[ \begin{matrix} x & y & z & 1\end{matrix}\right]·T_t=\left[ \begin{matrix} x & y & z & 1\end{matrix}\right] · \left[ \begin{matrix} 1&0&0&0\\0&1&0&0\\0&0&1&0\\T_x&T_y&T_z&1 \end{matrix} \right] = \left[ \begin{matrix} x+T_x & y+T_y & z+T_z & 1\end{matrix}\right]
6.1.3 比例变换
  • 局部比例变换: [ x y z 1 ] = [ x y z 1 ] T s = [ x y z 1 ] [ a 0 0 0 0 e 0 0 0 0 i 0 0 0 0 1 ] = [ a x e y i z 1 ] \left[ \begin{matrix} x' & y' & z' & 1\end{matrix}\right]=\left[ \begin{matrix} x & y & z & 1\end{matrix}\right]·T_s=\left[ \begin{matrix} x & y & z & 1\end{matrix}\right] ·\left[ \begin{matrix} a&0&0&0\\0&e&0&0\\0&0&i&0\\0&0&0&1 \end{matrix} \right] = \left[ \begin{matrix} ax&ey&iz & 1\end{matrix}\right] =[axeyiz1]
  • 整体比例变换: [ x y z 1 ] = [ x y z 1 ] T s = [ x y z 1 ] [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 s ] = [ x y z s ] \left[ \begin{matrix} x' & y' & z' & 1\end{matrix}\right]=\left[ \begin{matrix} x & y & z & 1\end{matrix}\right]·T_s=\left[ \begin{matrix} x & y & z & 1\end{matrix}\right] ·\left[ \begin{matrix} 1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&s \end{matrix} \right] = \left[ \begin{matrix} x&y&z & s\end{matrix}\right]
相关文章
相关标签/搜索