Game Development Reference
and we can follow the chain rule to get
θ = f ∇
and then expand q .
First, observe that f = q s / ( q s + q 3 )
q s near constraint satisfaction, so that
one is easy. For the rest, we have
q s −
00 q s .
( q 3 /q s )= 1
When all is said and done, we have to add an additional row to the projection
operator in Equation (9.13):
P hingec =
( f )
( e ) .
00 q s
The subscript “hingec” now stands for controlled hinge.
The case for the CV joint is similar. Start from the definition of the polar angle
θ = 2 atan(
/q s )
using Equation (9.5). The chain rule essentially provides the same results as be-
/q s )=
q v ,
p T =
and so, as in the case of the hinge constraint, the control part augments the pro-
jection defined in Equation (9.13) to
P CVc = P CV
p T , where P CV = 0001 T ,
as before in Equation (9.11). And now we are all set to control anything we like,
or almost anything.
What follows are simple illustrations of the constraints in action. One single rigid
body is attached to the inertial frame following the logic explained in the main
text, i.e., only the relative quaternion is of relevance.