Graphics Reference
In-Depth Information
+ z p cos α
bx p ) sin α k
+
c(ax p +
by p +
+
(ay p
cz p )K
= x p (a 2 K +
cos α) + y p (abK c sin α) + z p (acK + b sin α) i
+ x p (abK
y p b 2 K
cos α +
a sin α) j
+
c sin α)
+
+
z p (bcK
+ x p (acK
z p c 2 K
cos α k
b sin α)
+
y p (bcK
+
a sin α)
+
+
and the transform is:
=
x p
y p
z p
a 2 K +
cos α bK c sin αacK + b sin α
x p
y p
z p
2 K
abK
+
c sin α
+
cos α cK
a sin α
2 K
acK
b sin α
bcK
+
a sin α
+
cos α
which is identical to the transform derived using matrices.
Now let's test the transform with a simple example that can be easily verified. If
we rotate the point P( 10 , 0 , 0 ) , 180° about an axis defined by n
=
i
+
j , it should
end up at P ( 0 , 10 , 0 ) .
Therefore
α
=
180° ,
cos α
=−
1 ,
sin α
=
0 ,K
=
2
2
2
2
2
a
=
,b
=
,c
=
0
and
0
10
0
010
100
000
10
0
0
=
which is correct.
9.7 Summary
In this chapter we have seen how the 2
2 matrix for rotating a point in the plane
is developed for rotating points in space. In its simplest form, the rotations are re-
stricted to one of the three Cartesian axes, but by employing homogeneous coor-
dinates, the translation transform can be used to rotate points about an off-set axis
parallel with one of the Cartesian axes.
Composite Euler rotations are created by combining the matrices representing the
individual rotations about three successive axes, for which there are twelve combi-
nations. Unfortunately, one of the problems with such transforms is that they suffer
from gimbal lock, where one degree of freedom is lost under certain angle com-
binations. Another problem, is that it is difficult to predict how a point moves in
space when animated by a composite transform, although they are widely used for
positioning objects in world space.
We have also seen how to compute the eigenvector associated with a rotation
transform, and how it represents the axis about which rotation occurs, and the eigen-
value represents the angle of rotation.
Finally, matrices and vectors were used to develop a transform for rotating a point
about an arbitrary axis.
×
Search WWH ::




Custom Search