Game Development Reference
In-Depth Information
Figure 1.7. Change in basis vectors due to angular velocity.
from that, create a differential rotation matrix. However, there is another way to
do a cross product and that is to use a skew symmetric matrix of the appropriate
form, which is just what [ ω ] × is. Multiplying r j by the skew symmetric matrix
[ ω ] × will perform the cross product ω
r j , and multiplying R by [ ω ] × will
perform the cross product on all the basis vectors as a single operation, giving us
our desired result of d R /dt .
×
1.6.5 Numerical Integration for Orientation Using
Quaternions
Performing the Euler step for quaternions is similar to matrices. Again, we use an
equation that can turn our angular velocity vector into a form suitable for adding
to a quaternion:
q i +1 = q + h
2 wq ,
where w is a quaternion of the form
w =(0 ) .
There are a number of proofs for this, though none are as intuitive as the one
for rotation matrices. The most straightforward is from [Hanson 06]. If we take a
quaternion q to the t power, we find that
q t =exp( t log q ) .
For a rotation quaternion,
log q = 0 , θ
2 r ,
and hence,
exp( t log q )=exp 0 ,t θ
2 r
= cos
2 r .
2 , sin
Search Nedrilad ::




Custom Search