Graphics Reference
In-Depth Information
Inline Exercise 11.4: (a) What's
?
v × v
(b) Show that J
= 0 as expected.
(c) Suppose that v is a unit vector perpendicular to
v v
. Explain why
v is
v
v ×
perpendicular to both, and why
(
v )=
v .
v ×
v ×
The rotation matrix we seek is then
) J 2
v
M = I +sin(
θ
) J
+( 1
cos
θ
.
(11.17)
v
From Inline Exercise 11.4, it's clear that M
=
.Andif v is perpendicular
v
v
to
v
, then
) J 2
v
Mv = Iv +sin(
θ
) J
v +( 1
cos
θ
v
(11.18)
v
= v +sin(
θ
)
v +( 1
cos
θ
)(
(
v ))
(11.19)
v ×
v ×
v ×
= v +sin(
θ
)
v +( 1
cos
θ
)(
v )
(11.20)
v ×
=sin(
θ
)
v +cos(
θ
)( v ) ,
(11.21)
v ×
cos( u ) v 1 sin( u )( v 3 v )
which is just the rotation of v in the plane perpendicular to
by an angle
θ
. Since
v
M does the right thing to
, it must be the right
matrix, as per the Transformation Uniqueness principle (see Figure 11.2).
and to vectors perpendicular to
v
v
v 3
v
v
v
In coordinate form, it's
u
0
v z
v y
M =sin
θ
0
v x
(11.22)
v z
v y
0
v x
Figure 11.2: When v is orthogo-
nal to
y
z
v
v
v x v y
v z v x
v × v form a basis
for the plane perpendicular to
v
, v and
+ I ,
z
x
+( 1
cos
θ
)
v x v y v
v
(11.23)
v
.
v y v z
x
y
v y v z v
v
v z v x
where we've used the fact that
is a unit vector to simplify things a little. But the
earlier form is far easier to program correctly.
v
11.2.4 Finding an Axis and Angle from a Rotation Matrix
As we said earlier, it's a theorem that every rotation of 3-space has an axis (i.e.,
a vector that it leaves untouched). We can use Rodrigues' formula to recover the
axis from the matrix. We'll follow the approach of Palais and Palais [PP07].
We know every rotation matrix has an axis
and an amount of rotation,
θ
,
v
about
; Rodrigues' formula tells us the matrix must be
v
) J 2
v
M = I +sin(
θ
) J v
+( 1
cos
θ
(11.24)
for some unit vector
.
The trace of this matrix (the sum of the diagonal entries) is
and some angle
θ
v
) J 2
v
tr ( M )= tr ( I +sin(
θ
) J
+( 1
cos
θ
)
v
) tr ( J 2
v
= tr ( I )+sin(
θ
) tr ( J v )+( 1
cos
θ
)
2
2
2
= 3 +( 1
cos
θ
)(
2 (
x +
y +
z ))
v
v
v
= 3 +( 1
cos
θ
)(
2 )
= 1 + 2 cos
θ
,
 
 
 
Search WWH ::




Custom Search