Game Development Reference
In-Depth Information
8.5.5 Quaternion Magnitude
We can compute the magnitude of a quaternion, just as we can for vectors
and complex numbers. The notation and formula shown in Equation (8.4)
are similar to those used for vectors:
x y z
q =
w
=
w 2 + x 2 + y 2 + z 2
Quaternion magnitude
(8.4)
w 2 + v 2 .
=
w v
=
Let's see what this means geometrically for a rotation quaternion:
w 2 + v 2
Rotation quaternions
have unit magnitude
q =
w v
=
cos 2 (θ/2) + (sin(θ/2) n ) 2
=
(substituting using θ and n )
cos 2 (θ/2) + sin 2 (θ/2) n 2
=
cos 2 (θ/2) + sin 2 (θ/2)(1)
=
( n is a unit vector)
(sin 2 x + cos 2 x = 1)
=
1
= 1.
This is an important observation.
For our purposes of using quaternions to represent orientation, all quater-
nions are so-called unit quaternions, which have a magnitude equal to unity.
For information concerning nonnormalized quaternions, see the techni-
cal report by Dam et al. [11].
8.5.6 Quaternion Conjugate and Inverse
The conjugate of a quaternion, denoted q
, is obtained by negating the
vector portion of the quaternion:
q
=
w v
=
w
v
(8.5)
Quaternion conjugate
−x
=
w
x y z
=
w
−y
−z
.
The term “conjugate” is inherited from the interpretation of a quaternion
as a complex number. We look at this interpretation in more detail in
Section 8.5.14.
Search WWH ::




Custom Search