Graphics Reference
In-Depth Information
x -coordinate values, the first row/column to be affecting the y -coordinate
values, and the second row/column mainly affecting the z -coordinate val-
ues.
Translation vector. Depending on the order of operations (as will be dis-
cussed later), the translation operation is either encoded in fourth row or the
fourth column.
In our case, the matrix for the translation operator is
,
1000
0100
0010
t x
T
(
t x ,
t y ,
t z )=
t y
t z
1
the matrix for the scaling operator is
s x 000
0 s y 00
00 s z 0
0001
,
S
(
s x
,
s y
,
s z
)=
and the matrix for the rotation operator on the xy -plane is
cos
θ
sin
θ
00
.
sin
θ
cos
θ
00
R
( θ )=
0
0
1
0
0
0
0
1
The other two rotation ma-
trices. The matrix for rota-
tion on the xz -plane is
Another very important operator is the no-operation, or the identity operator I :
1000
0100
0010
0001
,
cos
θ
0
sin
θ
0
.
I 4 =
0
1
0
0
sin θ
0 s θ
0
0
0
0
1
and the matrix for rotation on
the yz -plane is
The identity operator is especially important when it comes to initialization of
variables for accumulation.
Mathematically, we can multiply (or concatenate) multiple 4
.
1
0
0
0
×
4 matrices into
0 s θ
sin θ
0
a single 4
×
4 matrix. For example, if M 1 and M 2 are two 4
×
4 matrices, then M a ,
0
sin θ
cos θ
0
0
0
0
1
M a =
M 1 M 2 ,
is also a 4
×
4 matrix. Notice that if we switch the multiplication order, then M b ,
M b =
M 2 M 1 ,
Search WWH ::




Custom Search