Graphics Reference
In-Depth Information
and
p =( x p i + y p j + z p k )cos α +( a i + b j + c k )( ax p + by p + cz p ) K
bx p ) k ]sin α
p =[ x p cos α + a ( ax p + by p + cz p ) K +( bz p
+[( bz p
cy p ) i +( cx p
az p ) j +( ay p
cy p )sin α ] i
+[ y p cos α + b ( ax p + by p + cz p ) K +( cx p
az p )sin α ] j
+[ z p cos α + c ( ax p + by p + cz p ) K +( ay p − bx p )sin α ] k
p = x p a 2 K +cos α + y p ( abK
c sin α )+ z p ( acK + b sin α ) i
+ x p ( abK + c sin α )+ y p b 2 K +cos α + z p ( bcK − a sin α ) j
+ x p ( acK − b sin α )+ y p ( bcK + a sin α )+ z p c 2 K +cos α k
and the transformation becomes
x p
y p
z p
a 2 K +cos α bK
c sin αacK + b sin α
abK + c sin α 2 K +cos α cK
x p
y p
z p
=
·
a sin α
acK
b sin α cK + a sin α 2 K +cos α
where K =1
cos α .
Now let's approach the problem using transforms and trigonometric identities.
Figure 7.25 shows a point P ( x , y , z ) to be rotated through an angle α to
P ( x ,y ,z ) about an axis defined by v = a i + b j + c k where
=1.
The transforms to achieve this operation can be expressed as follows
v
x
y
z
x
y
z
= T 5 ×
T 4 ×
T 3 ×
T 2 ×
T 1 ×
which aligns the axis of rotation with the x -axis, performs the rotation of
about the x -axis, and returns the axis of rotation to its original position.
Y
P
P'
a
v
b
q
a
f
Z
c
X
Fig. 7.25. The geometry associated with rotating a point about an arbitrary axis.
Search WWH ::




Custom Search