Game Development Reference
In-Depth Information
transposed. The matrix vector multiplication is Ax . Quaternions q
as vectors with respect to addition and scalar multiplication. What makes them a
useful algebra is the product operation, which we write as qp . We will use the
right-hand convention for this, as is defined in Chapter 1. A three-dimensional
vector x can be promoted to a quaternion p = q ( x ) by writing p s =0and
p v = x . That is a purely imaginary quaternion since p =
p . If I forget to
tell you in a particular set of equations, I always use u , v ,and n to denote right
handed orthogonal systems, which are rotations of the references x , y ,and z with
the exact correspondence.
Credit where credit is due. My initial inspiration came after reading [Ser-
ban and Haug 98] and [Haug 89]. I then found results similar to what is below
in [Tasora and Righettini 99]. The matrix formulation of quaternion algebra is
already in the graphics literature [Shoemake 91, Shoemake 10] but is not widely
used. There is a whole chapter about details of this matrix representation in my
PhD thesis [Lacoursiere 07a] for those who may be interested.
And now, let's begin.
9.3 The Problem
Rotational constraints between rigid bodies are problematic when they are defined
using dot product indicators. This makes them bistable since obviously x
y =0
implies that
y =0as well. Take, for instance, the rotational part of a
hinge joint between bodies 1 and 2 that have right-handed orthonormal frames
defined with u (1) , v (1) , n (1) and u (2) , v (2) , n (2) , respectively. Taking n (1) as
the normal axis of the hinge attached on body 1, the hinge indicator is defined as
the set of the two conditions
n (1)
u (2) =0
n (1)
v (2) =0 .
Figure 9.1. The hinge definition.
Search Nedrilad ::

Custom Search