理解transformation Matrix
1.Every matrix M is associated with a coordinate system. This coordinate system has origin (t0, t1, t2) and vectors (a00,a110,a20), (a01,a11,a21), and (a02,a12,a22) as axes. Matrix M maps the standard coordinate system to the coordinate system with the origin (0, 0, 0) and axes (1, 0, 0), (0, 1, 0), and (0, 0, 1).
直接paste一段关于AcgeMatrix3D的解释:
Class AcGeMatrix3d represents an affine transformation of 3D space, including translation. Each matrix M has the form:
a00 a01 a02 t0
a10 a11 a12 t1
a20 a21 a22 t2
where the matrix A:
a00 a01 a02
a10 a11 a12
a20 a21 a22
is called the linear part of M.
Column T:
t0
t1
t2
is called a translational part of M.
To get AcGePoint3dpnt transformed by corresponding transformation one has to take the product M x P of the matrix M and point-column P = ( pnt.x, pnt.y, pnt.z, 1.0 ) to the power of T . To get AcGeVector3dvec transformed by corresponding transformation one has to take the product M x V of the matrix M and vector-column V = (vec.x, vec.y, vec.z, 0.0) to the power of T.
Every matrix M is associated with a coordinate system. This coordinate system has origin (t0, t1, t2) and vectors (a00,a110,a20), (a01,a11,a21), and (a02,a12,a22) as axes. Matrix M maps the standard coordinate system to the coordinate system with the origin (0, 0, 0) and axes (1, 0, 0), (0, 1, 0), and (0, 0, 1).
2. 一些note关于3D数学基础:图形与游戏开发
1) 世界坐标系(translation)->惯性坐标系(rotation)->物体坐标系。还有camera坐标系。
2) 矩阵:矩阵是3D数学的重要基础,它主要用来描述两个坐标系之间的关系,通过定义一种运算而将一个坐标系的向量转换到另一个坐标系中
3) 用基向量(1,0,0),(0,1,0),(0,0,1)乘任意矩阵M,得:矩阵M的每一行都可以理解为转换后的基向量。
4) 旋转坐标系相当于以相反的量旋转物体。
5) 使用4*4矩阵的一个原因就是它能包含平移(translation)。
6) 包含平移的仿射变换,基本思想:将变换的中心点平移到原点,进行线性变换,然后再将中心点平移到原来的位置。 TRT-1