GAMES101_Lecture_04

1. 3D Transformations

scale   S(sx,sy,sz)=(sx0000sy0000sz00001)S(s_x,s_y,s_z)= \left( \begin{matrix} s_x & 0 & 0 & 0\\ 0 & s_y & 0 & 0\\ 0 & 0 & s_z & 0\\ 0 & 0 &0 & 1 \end{matrix} \right)
Translation   T(tx,ty,tz)=(100tx010ty001tz0001)T(t_x,t_y,t_z)= \left( \begin{matrix} 1 & 0 & 0 & t_x\\ 0 & 1& 0 & t_y\\ 0 & 0 & 1 &t_z\\ 0 & 0 &0 & 1 \end{matrix} \right)
GAMES101_Lecture_04
GAMES101_Lecture_04

2. Viewing (观测) transformation

model transformation -> view transformation -> projection transformation

2.1 View (视图) / Camera transformation

GAMES101_Lecture_04
GAMES101_Lecture_04

2.2 Projection (投影) transformation

3D到2D的转化
GAMES101_Lecture_04

Orthographic (正交) projection

不会带来近大远小的效果,多用于工程制图
GAMES101_Lecture_04
GAMES101_Lecture_04

Perspective (透视) projection

进大远小,平行线不在平行,会相交
GAMES101_Lecture_04
GAMES101_Lecture_04
GAMES101_Lecture_04
GAMES101_Lecture_04
GAMES101_Lecture_04
GAMES101_Lecture_04
GAMES101_Lecture_04
GAMES101_Lecture_04