Quaternions (Advanced Methods in Computer Graphics) Part 6

Dual Quaternions

In previous sections we saw applications of unit quaternions in representing rotational transformations. Dual quaternions generalize the notion of quaternions to an 8-tuple, and provide a convenient tool for representing rigid body transformations containing both rotations and translations in three-dimensional space. The mathematical structure of dual quaternions uses two quaternions that are combined using the algebra of dual numbers. Before considering the theoretical aspects of dual quaternions, we will look at the definition and properties of dual numbers.

Dual Numbers

The structure and the algebra of dual numbers are very similar to complex numbers. Given two real numbers a and b, a dual number can be written as a + " b, where "2 = 0. The number a is then called the real part, and b the dual part. " is often referred to as the dual unit. As in the case of complex numbers, we can use a tuple notation d = (a, b) to represent a dual number. The algebra of dual numbers satisfies the following rules for addition and multiplication:

tmpc2f9-282_thumb[2][2][2][2]_thumbtmpc2f9-283_thumb[2][2][2][2]_thumb


Using the multiplication rule in Eq. 5.76 we find that

tmpc2f9-284_thumb[2][2][2][2]_thumb

Therefore, the second term in the product above is the multiplicative inverse of (a, b), provided a ^ 0. The conjugate of a dual number d = (a, b) is defined in a way similar to that of a complex number:

tmpc2f9-285_thumb[2][2][2][2]_thumb

Using Eq. 5.76, it can be verified that dd* = a2. We also note that (a, b)2 = (a2, 2ab). Hence,

tmpc2f9-286_thumb[2][2][2][2]_thumb

The above equation directly leads to the definition of the square-root of a dual number:

tmpc2f9-287_thumb[2][2][2][2]_thumb

In the next section, we will extend the concepts introduced above to the algebra of dual quaternions. For notational convenience, dual numbers will often be written as (a, à).

Algebra of Dual Quaternions

A dual quaternion is a quaternion constructed using dual numbers as its components: Q = (q0, q1, q2, q3), where q; = (q;, q, ), i = 0,… 3. Equivalently, we can also define a dual quaternion as a dual number whose components are quaternions: Q = (Q, Q) where Q = (q0, q1, q2, q3), and Q = (<?o, qi, q2, ^3). Q is a pure dual quaternion if q0 = 0, or equivalently if q0 = q0 = 0. We can also represent any dual quaternion Q as an 8-tuple (q0, q1, q2, q3, (Q0, (Q1, q2, (Q3). The following representation of Q reveals the products of quaternion units and the dual units that are associated with each component of the 8-tuple.

tmpc2f9-288_thumb[2][2][2][2][2]

Table 5.2 Multiplication table for dual quaternion units

1

i

j

k

s

si

sj

sk

1

1

i

j

k

s

si

sj

sk

i

i

-1

k

-j

si

-s

sk

-sj

j

j

-k

-1

i

sj

-sk

-s

si

k

k

j

-i

-1

sk

sj

-si

-s

s

s

si

sj

sk

0

0

0

0

si

si

-s

sk

-sj

0

0

0

0

sj

sj

-sk

-s

si

0

0

0

0

sk

sk

sj

-si

-s

0

0

0

0

The following dual quaternions form a mutually orthogonal set of basis vectors for the entire 8-dimensional space of dual quaternions.

tmpc2f9-289_thumb[2][2][2][2][2]

Any dual quaternion is a linear combination of the above basis vectors:

tmpc2f9-290_thumb[2][2][2][2][2]

Using the multiplication rule for quaternion basis, we observe that i(sj) = sk, (sk)j = —si, (si)(sj) = 0 etc. Note also that si = is. The complete multiplication table is given in Table 5.2. The multiplication rule for dual numbers given in Eq. 5.76 can be extended to quaternions:

tmpc2f9-291_thumb[2][2][2][2][2]

We can also multiply a dual quaternion P by a quaternion Q:

tmpc2f9-292_thumb[2][2][2][2][2]

The conjugate of a dual quaternion is defined in three different ways, as discussed below.

Conjugate type 1: As mentioned in the beginning of this section, we can treat a dual quaternion Q as a quaternion with dual number components (q0, q1, q2, q3). Applying the rule for a quaternion conjugate, we get Q* = (q0, —q1, —q2, — q3), hence

tmpc2f9-293_thumb[2][2][2][2][2]

This definition satisfies the following property:

tmpc2f9-294_thumb[2][2][2][2][2]

In the above derivation, note thattmpc2f9-295_thumb[2][2][2][2][2]where indicates the dot product between the two quaternions. It can also be easily verified that tmpc2f9-296_thumb[2][2][2][2][2]for any two dual quaternions P, Q. This property is useful for combining two or more successive transformations (see Eq. 5.51). The norm of a dual quaternion can now be defined as follows:

tmpc2f9-299_thumb[2][2][2][2][2]

The above derivation is based on the definition of the square-root of a dual number as given in Eq. 5.81. A unit dual quaternion Q satisfies the condition IIQII = 1. From Eq. 5.89, we see that Q = (Q, Q) is a unit dual quaternion if and only if |Q| = 1 (i.e., Q is a unit quaternion) and Q^Q= 0 (i.e., Q is orthogonal to Q in quaternion space, or Q=0).

Conjugate type 2: If we treat Q as a dual number (Q, Q), then the application of the rule in Eq. 5.79 gives the following definition:

tmpc2f9-300_thumb[2][2][2][2][2]

The main drawback of the above definition is that it does not lead to a convenient definition for the unit norm. Further, it does not satisfy the condition (PQ)* = Q*P*.

Conjugate type 3: Here we combine both the above definitions to form a new type of conjugate as given below:

tmpc2f9-301_thumb[2][2][2][2][2]

The above definition satisfies the propertiestmpc2f9-302_thumb[2][2][2][2][2]The norm in this case is defined as

tmpc2f9-304_thumb[2][2][2][2][2]

With the above norm, a unit dual quaternion Q must have a unit quaternion Q for its real part, and Q Q* must be a real quaternion. In the next section, we will use the above definition (type 3) of the conjugate to construct dual quaternions that represent rigid body transformations.

Transformations Using Dual Quaternions

Recall that any unit quaternion Q can be used to perform a rotational transformation of a vector p = (x, y, z) in three-dimensional space using the quaternion product QPQ* where P is the quaternion (0, p). We can also represent the vector p by the dual quaternion P = (1, P) = (1, 0, 0, 0, 0, x, y, z). P is a unit dual quaternion. Similarly, if Q is a unit quaternion, then Q = (Q, 0) is a unit dual quaternion. Then

tmpc2f9-305_thumb[2][2][2][2][2]

where P’ is the quaternion (0, p’) that represents the transformed (rotated) vector. The above result is valid for all types of dual quaternion conjugates described in the previous section. It shows that for every unit quaternion there exists a corresponding unit dual quaternion that performs exactly the same rotational transformation of vectors. We now ask the question: does such a transformation exist for translations in three-dimensional space?

Given a translation vector t = (t1, t2, t3), let us construct a quaternion T in the form (0, t/2), and from it, a dual quaternion T as

tmpc2f9-306_thumb[2][2][2][2][2]

Note the division of the vector components by 2 in T, similar to that of a rotation angle in a unit quaternion (see Eq. 5.44). Using conjugate type 3,

tmpc2f9-307_thumb[2][2][2][2][2]

Applying a transformation of P using T similar to Eq. 5.93,

tmpc2f9-308_thumb[2][2][2][2][2]

The above equation shows that a point p = (x, y, z) gets transformed into the point p’ = (x +11, y +12, z +13) if p was embedded in a quaternion as P = (0, p), the quaternion itself embedded in a dual quaternion P as (1, P). Thus we can use T as a dual quaternion representing spatial translations. We will now use the above results to construct a dual quaternion that represents the most general rigid body transformation: a rotation by an angle i about an arbitrary vector (l, m, n) through the origin, followed by a displacement by a translation vector (t1, t2, t3). Let Q = (Q, 0), T = (1, T) represent rotation and translation respectively. The composite transformation is then represented by the dual quaternion G = (Q, TQ) as seen in the following derivation:

tmpc2f9-309_thumb[2][2][2][2][2]

The quaternion QPQ* + 2T gives the transformed point after the required rotation and translation.

Summary

This topic gave an overview of the quaternion algebra including the properties that are useful for graphics applications. Unit quaternions represent rotations about the origin. Composite rotations can be represented by a product of quaternions. The multiplicative inverse of a unit quaternion is the same as its conjugate. A unit quaternion with all of its components negated represents the same orientation as the original quaternion.

Computer graphics animations generally involve several rotation interpolations. This topic compared the effects produced by Euler angle interpolation, axisangle interpolation and quaternion interpolation. The spherical linear interpolation of rotations using unit quaternions produced optimal rotation with uniform angular velocity. Methods for visualising three-dimensional rotation sequences were discussed.

This topic also presented the algebra of dual quaternions which has recently found applications in graphics. Dual quaternions are defined based on the concept of dual numbers, and they can be viewed as 8-dimensional vectors. The conjugate of a dual quaternion can be defined in three different ways. The property of dual numbers that is important from the point of view of computer graphics is that the most general rigid-body transformation in three-dimensional space can be represented by unit dual quaternions.

The next topic further analyses three-dimensional motion using forward and inverse kinematics equations. In this topic, we will revisit quaternion representation of rotations to define angular velocity components of motion.

Next post:

Previous post: