Page 138 - Computer Graphics Handout
P. 138
b = (p0, p),
then using the dot and cross products for vectors,
a + b = (p0+ q0, p + q),
ab = (p0q0− q . p, q0p + p0q + q × p).
We can also define a magnitude for quaternions in the normal manner as
Quaternions have amultiplicative identity, the quaternion (1, 0), and it is easy to verify that the inverse of a quaternion is given by
3.14.2 Quaternions and Rotation
So far, we have only defined a new mathematical object. For it to be of use to us, we must relate it to our geometric entities and
show how it can be used to carry out operations such as rotation. Suppose that we use the vector part of a quaternion to represent
a point in space
p = (0, p).
Thus, the components of p = (x, y, z) give the location of the point. Consider the Quaternion
where v has unit length.We can then show that the quaternion r is a unit quaternion (|r| = 1), and therefore
If we consider the quaternion product of the quaternion p that represents a point with r, we obtain the quaternion
,
p = rpr−1.
,
This quaternion has the form (0, p ), where
and thus p_ is the representation of a point.What is less obvious is that p_ is the result of rotating the point p by θ degrees about the
,
vector v. However, we can verify that this indeed is the case by comparing terms in p with those of the general rotation.
Before doing so, consider the implication of this result. Because we get the same result, the quaternion product formed from r and
p is an alternate to transformation matrices as a representation of rotation with a fixed point of the origin about an arbitrary axis. If
we count operations, quaternions are faster and have been built into both hardware and software implementations.
Let’s consider a few examples. Suppose that we consider the rotation about the zaxis by θ with a fixed point at the origin. The
desired unit vector v is (0, 0, 1), yielding the quaternion
The rotation of an arbitrary point p = (x, y, z) yields the quaternion
138

