=============================================================
Translation:
(1 0 0 0)
T = (0 1 0 0)
(0 0 1 0)
(Tx Ty Tz 1)
[x' y' z' 1] = [x y z 1].T
=============================================================
Scaling:
(Sx 0 0 0)
S = (0 Sy 0 0)
(0 0 Sz 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].S
=============================================================
Rotation_Right Hand Coordinate:
by x axis:
(1 0 0 0)
Rx(q) = (0 cosq -sinq 0)
(0 sinq cosq 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].Rx(q)
x' = x
y' = z*sinq + y*cosq
z' = z*cosq -y*sinq
by y axis:
(cosq 0 sinq 0)
Ry(q) = (0 1 0 0)
(-sinq 0 cosq 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].Ry(q)
x' = x*sinq + z*cosq
y' = y
z' = x*cosq - z*sinq
by z axis:
(cosq -sinq 0 0)
Rz(q) = (sinq cosq 0 0)
(0 0 1 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].Rz(q)
x' = y*sinq + x*cosq
y' = y*cosq - x*sinq
z' = z
=============================================================
Rotation_Left Hand Coordinate
by x axis:
(1 0 0 0)
Rx(q) = (0 cosq sinq 0)
(0 -sinq cosq 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].Rx(q)
x' = x
y' = y*cosq - z*sinq
z' = y*sinq + z*cosq
by y axis:
(cosq 0 -sinq 0)
Ry(q) = (0 1 0 0)
(sinq 0 cosq 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].Ry(q)
x' = z*sinq + x*cosq
y' = y
z' = z*cosq - x*sinq
by z axis:
(cosq sinq 0 0)
Rz(q) = (-sinq cosq 0 0)
(0 0 1 0)
(0 0 0 1)
[x' y' z' 1] = [x y z 1].Rz(q)
x' = x*cosq - y*sinq
y' = x*sinq + y*cosq
z' = z
本文详细介绍了三维空间中平移、缩放及旋转的基本变换矩阵,并分别给出了右手坐标系与左手坐标系下的具体数学表达形式。通过这些变换矩阵,可以实现三维图形的位置调整、大小改变以及方向旋转。
1564

被折叠的 条评论
为什么被折叠?



