Game Development Reference
In-Depth Information
8.5.11 Quaternion Exponentiation
Quaternions can be exponentiated, which means that we can raise a quater-
nion to a scalar power. Quaternion exponentiation, denoted q t , should not
be confused with the exponential function exp q . The exponential function
accepts only one argument: a quaternion. Quaternion exponentiation has
two arguments: the quaternion q and the scalar exponent t.
The meaning of quaternion exponentiation is similar to that of real
numbers. Recall that for any scalar a, besides zero, a 0 = 1 and a 1 = a.
As the exponent t varies from 0 to 1 the value of a t varies from 1 to a. A
similar statement holds for quaternion exponentiation: as t varies from 0
to 1 the quaternion exponentiation q t varies from [1, 0 ] to q .
Quaternion exponentiation is useful because it allows us to extract a
“fraction” of an angular displacement. For example, to compute a quater-
nion that represents one third of the angular displacement represented by
the quaternion q , we would compute q 1/3 .
Exponents outside the [0,1] range behave mostly as expected—with one
major caveat. For example, q 2 represents twice the angular displacement
as q . If q represents a clockwise rotation of 30 o about the x-axis, then q 2
represents a clockwise rotation of 60 o about the x-axis, and q
−1/3 represents
a counterclockwise rotation of 10 o about the x-axis. Notice in particular
that the inverse notation q
−1 can also be interpreted in this context and
the result is the same: the quaternion that performs the opposite rotation.
The caveat we mentioned is this: a quaternion represents angular dis-
placements using the shortest arc. Multiple spins cannot be represented.
Continuing our example above, q 8 is not a 240 o clockwise rotation about
the x-axis as expected; it is a 120 o counterclockwise rotation. Of course,
rotating 240 o in one direction produces the same end result as rotating 120 o
in the opposite direction, and this is the point: quaternions really capture
only the end result. In general, many of the algebraic identities concerning
exponentiation of scalars, such as (a s ) t = a st , do not apply to quaternions.
In some situations, we do care about the total amount of rotation, not
just the end result. (The most important example is that of angular veloc-
ity.) In these situations, quaternions are not the correct tool for the job;
use the exponential map (or its cousin, the axis-angle format) instead.
Now that we understand what quaternion exponentiation is used for,
let's see how it is mathematically defined. Quaternion exponentiation is
defined in terms of the “utility” operations we learned in the previous sec-
tion. The definition is given by
Raising a quaternion to a
power
q t = exp (tlog q ).
(8.8)
Notice that a similar statement is true regarding exponentiation of a scalar:
a t = e (t ln a) .
 
Search WWH ::




Custom Search