Game Development Reference
In-Depth Information
legend, but a commemorative plaque holds their place. Thus quaternions
were invented.
Since we weren't on the Broom Bridge in 1843, we can't say for certain
what made Hamilton realize that a 3D system of complex numbers was
no good, but we can show how such a set could not be easily mapped
to 3 × 3 matrices and rotations. A 3D complex number would have two
complex parts, i and j, with the properties i 2 = j 2 = −1. (We would
also need to define the values of the products ij and ji. Exactly what
these rules should be, we're not sure; perhaps Hamilton realized this was
a dead end. In any case, it doesn't matter for the present discussion.)
Now, a straightforward extension of the ideas from 2D would mean that
we could somehow associate the numbers 1, i, and j with the set of 3 × 3
matrices, such that all the usual algebra laws hold. The number 1 must
obviously map to the 3D identity matrix I 3 . The number −1 should map
to its negative, − I 3 , which has −1s on the diagonal. But now we run into
a problem trying to a find matrices for i and j whose square is − I 3 . We
can quickly see that this is not possible because the determinant of − I 3
is −1. To be a root of this matrix, i or j must have a determinant that
is the square root of −1 because the determinant of a matrix product is
the product of the determinants. The only way this can work is for i and
j to contain entries that are complex. In short, there doesn't seem to be
a coherent system of 3D complex numbers; certainly there isn't one that
maps elegantly to rotations analogously to standard complex numbers and
2D rotations. For that, we need quaternions.
Quaternions extend the complex number system by having three imag-
inary numbers, i, j, and k, which are related by Hamilton's famous equa-
tions:
i 2 = j 2 = k 2 = −1
ij = k, ji = −k,
jk = i, kj = −i,
ki = j, ik = −j.
The rules for 4D
complex numbers that
Hamilton wrote on the
Broom Bridge
(8.10)
The quaternion we have been denoting [w,(x,y,z)] corresponds to the com-
plex number w + xi + yj + zk. The definition of the quaternion product
given in Section 8.5.7 follows from these rules. (Also see Exercise 6.) The
dot product, however, basically ignores all of this complex i,j,k business
and treats the operands as simple 4D vectors.
Now we return to matrices. Can we embed the set of quaternions into
the set of matrices such that Hamilton's rules in Equation (8.10) still hold?
Yes, we can, although, as you might expect, we map them to 4×4 matrices.
Real numbers are mapped to a matrix with the number on each entry of
Search WWH ::




Custom Search