Game Development Reference
In-Depth Information
quaternions more di cult to pack into a fixed-point number than
Euler angles or an exponential map.
Can become invalid. This can happen either through bad input data,
or from accumulated floating point roundoff error. (We can address
this problem by normalizing the quaternion to ensure that it has unit
magnitude.)
Di cult for humans to work with. Of the three representation meth-
ods, quaternions are the most di cult for humans to work with di-
rectly.
8.5.14 Quaternions as Complex Numbers
We end our discussion on quaternions in the place that most texts begin:
a discussion of their interpretation as complex numbers. If you are inter-
ested in quaternions solely for rotations, you can safely skip this section. If
you want a bit deeper understanding or are interested in the mathematical
heritage of quaternions and the circumstances that surrounded their inven-
tion, this section will be interesting. We will be following an approach due
to John McDonald of DePaul University [45]. Among other things, this
method is able to explain two peculiarities of quaternions: the appearance
of θ/2 rather than θ and the unusual mathematical form qvq
−1 :
We begin by considering how we can embed the set of real numbers in
the set of 2×2 matrices. For any given scalar a, we associate it with exactly
one 2 × 2 matrix, namely the matrix that has a on both of the diagonal
elements:
Each real scalar maps to
a 2 × 2 matrix
a 0
0 a
a ≡
.
We have chosen a subset of the 2×2 matrices, and established a one-to-one
correspondence between this smaller set of matrices and the set of all real
numbers. We could have established this one-to-one relationship in other
ways, but this particular way of doing it is important because it preserves
all the ordinary algebra laws of addition, subtraction, and multiplication:
the associative property, distributive property, nonfactorability of zero, and
so on. (We can even include division if we treat division as multiplication
by the inverse.) For example,
a 0
0 a
b 0
0 b
a + b
0
+
=
,
Addition, subtraction,
and multiplication work
the same
0
a + b
a 0
0 a
b 0
0 b
a − b
0
=
,
0
a − b
a 0
0 a
b 0
0 b
ab 0
0 ab
=
.
 
Search WWH ::




Custom Search