Game Development Reference
What is illustrated is very simple indeed: the simulation starts with a large
constraint violation. Only two cases are considered, namely, one in which the
initial configuration produces a little less than 50% of the way toward maximal
constraint violation, the other of which is just over 50%. As expected, all the dot
product-based constraints stabilize at the “good” zero of the indicator for the first
case and at the bad zero for the second. But not so for the quaternion constraints.
In Figures 9.5-9.10, I plot both the constraint violation and the value of q s for
the body. We have q s =1at both the “good” zero and the “bad” zero of the dot
A further comparison is made between the driven Hooke and CV joints. The
pictures demonstrate the wobbling of the Hooke joint, i.e., the difference between
the input rotational velocity and the output. This joint also appears to be unstable
over long periods of time.
For all the examples, I have used the S POOK integrator [Lacoursiere 07b],
which I derived in my PhD thesis [Lacoursiere 07a]. It is an extension of the
Verlet integrator for constrained systems. This is very stable and provably so. But
you can use any technique that you feel comfortable with.
A quaternion-based representation of rotational constraints can add much stability
to simulations of many things, cars for instance. They are not difficult to imple-
ment because the three different constraints amount to the selection of rows in a
master lock constraint. In addition, the universal joint that is natural in the quater-
nion representation is better than the well-known Hooke joint, which is equally
natural in the dot product representation because it exactly transfers the rotation
of one body into the other. This is different from the Hooke joint, which loses
efficiency at moderate angles already and is more closely related to the real drive
trains found in front traction cars.
This research was supported by High Performance Computing Center North
(HPC2N), Swedish Foundation for Strategic Research grant (A3 02:128), and EU
Mal 2 Structural Funds (UMIT-project).
[Haug 89] Edward J. Haug. Computer Aided Kinematics and Dynamics of Me-
chanical Systems, vol 1; Basic Methods . Allyn and Bacon Series in Engi-
neering, Upper Saddle River, NJ: Prentice Hall, 1989.