Game Development Reference
In-Depth Information
2
4
3
5
2
4
3
5
cos 30 o
0 −sin 30 o
0.866
0.000 −0.500
3.
0
1
0
=
0.000
1.000
0.000
sin 30 o
cos 30 o
0
0.500
0.000
0.866
2
4
3
5
0.968 −0.212 −0.131
0.203
4.
0.976
−0.084
0.146
0.054
0.988
2
4
3
5
2
0
0
5.
0
2
0
0
0
2
2
3
1.285
−0.571
0.857
4
5
6.
−0.571
2.145
−1.716
0.857
−1.716
3.573
2
4
3
5
0.929
0.143 −0.214
7.
0.143
0.714
0.429
−0.214
0.429
0.356
2
3
0.857
.286 −0.428
4
5
8.
0.286
.428
0.858
−0.428
.858 −0.286
9.
(a)
2
4
3
5
2
4
3
5
0.866
0.000 −0.500
1.000
0.000
0.000
M obj→wld = R y (30 o )R x (−22 o ) =
0.000
1.000
0.000
0.000
0.927 −0.375
0.500
0.000
0.866
0.000
0.375
0.927
2
4
3
5
0.866 −0.187 −0.464
0.000
=
0.927
−0.375
0.500
0.324
0.803
(b) Here, we need to take the opposite rotations, in the opposite order.
2
4
3
5
2
4
3
5
1.000
0.000
0.000
0.866
0.000
0.500
M wld→obj = R x (22 o )R y (−30 o ) =
0.000
0.927
0.375
0.000
1.000
0.000
0.000 −0.375
0.927
−0.500
0.000
0.866
2
4
3
5
0.866
0.000
0.500
=
−0.187
0.927
0.324
−0.464 −0.375
0.803
Or, you might have already known that the result would be the transpose of the
answer from the previous problem. If so, good for you.
(c) Convert the z-axis from object space to upright space:
2
4 0.866 −0.187 −0.464
3
5
0
0
1
0.000
0.927
−0.375
=
0.500
0.324
0.803
.
0.500
0.324
0.803
Of course, this is just the same thing as extracting the last row of the matrix.
Search WWH ::




Custom Search