Graphics Reference
In-Depth Information
work, it is nevertheless extremely tedious, but is a good exercise for improving one's
algebraic skills!
Figure
9.10
shows a point
P(x,y,z)
to be rotated through an angle
α
to
P
(x
,y
,z
)
about an axis defined by
ˆ
c
k
.
The transforms to achieve this operation can be expressed as follows:
⎡
n
=
a
i
+
b
j
+
⎤
⎡
⎤
x
y
z
x
y
z
⎣
⎦
=
⎣
⎦
R
−
φ,y
R
θ,z
R
α,x
R
−
θ,z
R
φ,y
which aligns the axis of rotation with the
x
-axis, performs the rotation of
P
through
an angle
α
about the
x
-axis, and returns the axis of rotation back to its original
position. Therefore,
⎡
⎤
⎡
⎤
cos
φ
0 n
φ
cos
θ
sin
θ
0
⎣
⎦
,
⎣
⎦
R
φ,y
=
0
1
0
R
−
θ,z
=
−
sin
θ
cos
θ
0
−
sin
φ
0
cos
φ
0
0
1
⎡
⎤
⎡
⎤
10
0
cos
θ
−
sin
θ
0
⎣
⎦
,
⎣
⎦
R
α,x
=
0
cos
α
−
sin
α
R
θ,z
=
sin
θ
cos
θ
0
0 n
α
cos
α
0
0
1
⎡
⎤
cos
φ
sin
φ
01 0
sin
φ
0
−
⎣
⎦
.
R
−
φ,y
=
0
cos
φ
Let
⎡
⎤
a
11
a
12
a
13
⎣
⎦
R
−
φ,y
R
θ,z
R
α,x
R
−
θ,z
R
φ,y
=
a
21
a
22
a
23
a
31
a
32
a
33
where by multiplying the matrices together we find that:
cos
2
φ
cos
2
θ
cos
2
φ
sin
2
θ
cos
α
sin
2
φ
cos
α
a
11
=
+
+
a
12
=
cos
φ
cos
θ
sin
θ
−
cos
φ
sin
θ
cos
θ
cos
α
−
sin
φ
cos
θ
sin
α
cos
φ
sin
φ
cos
2
θ
cos
φ
sin
φ
sin
2
θ
cos
α
sin
2
φ
sin
θ
sin
α
a
13
=
+
+
cos
2
φ
sin
θ
sin
α
+
−
cos
φ
sin
φ
cos
α
a
21
=
sin
θ
cos
θ
cos
φ
−
cos
θ
sin
θ
cos
φ
cos
α
+
cos
θ
sin
φ
sin
α
sin
2
θ
+
cos
2
θ
cos
α
a
22
=
a
23
=
sin
θ
cos
θ
sin
φ
−
cos
θ
sin
θ
sin
φ
cos
α
−
cos
θ
cos
φ
sin
α
cos
φ
sin
φ
cos
2
θ
+
cos
φ
sin
φ
sin
2
θ
cos
α
−
cos
2
φ
sin
θ
sin
α
a
31
=
−
cos
φ
sin
φ
cos
α
a
32
=
sin
φ
cos
θ
sin
θ
−
sin
φ
sin
θ
cos
θ
cos
α
+
cos
φ
cos
θ
sin
α
sin
2
φ
cos
2
θ
sin
2
φ
sin
2
θ
cos
α
a
33
=
+
−
cos
φ
sin
φ
sin
θ
sin
α
cos
2
φ
cos
α.
+
cos
φ
sin
φ
sin
θ
sin
α
+