Graphics Reference
In-Depth Information
Next, we compute q 2 q 1
q 1 =
s 1
v 1
q 2 =
s 2
v 2
q 2 q 1 =
(s 2
v 2 )(s 1
v 1 )
= s 1 s 2
v 1 ·
v 2 + s 2 (
v 1 ) + s 1 (
v 2 ) + (
v 2 ) × (
v 1 )
= s 1 s 2
v 1 ·
v 2 s 1 v 2 s 2 v 1
v 1 ×
v 2
(5.4)
and as ( 5.3 ) equals ( 5.4 ), ( q 1 q 2 ) =
q 2 q 1 .
5.9 The Inverse Quaternion
Given a quaternion q we can compute its inverse q 1
as follows.
By definition, we require that
qq 1
q 1 q
=
=
1 .
(5.5)
First, we multiply ( 5.5 )by q
q qq 1
q q 1 q
q
=
=
(5.6)
and from ( 5.6 ) we can write
q
q q =
q
q 1
=
2 .
|
q
|
If q is a unit quaternion, then q 1
q , which is useful when reversing a rotational
=
sequence. Therefore, as
( q 1 q 2 ) =
q 2 q 1
then
( q 1 q 2 ) 1
q 1
2
q 1
1
=
.
For completeness let's evaluate the inverse of q where
1
3
1
3
1
3
q
=
1
+
i
+
j
+
k
1
3 i
1
3 j
1
3 k
q =
1
1
3 +
1
3 +
1
3 =
2
|
q
|
=
1
+
2
1
3 k
1
2
1
3 i
1
3 j
1
q 1
=
1
2
1
12
1
12
1
12
=
i
j
k .
Search WWH ::




Custom Search