Game Development Reference
In-Depth Information
to return the canonical Euler angle triple. The conversion methods shown
in Section 8.7 demonstrate these principles.
A common misconception is that, because of Gimbal lock, certain orienta-
tions cannot be described using Euler angles. Actually, for the purposes of
describing an orientation, aliasing doesn't pose any problems. To be clear,
any orientation in 3D can be described by using Euler angles, and that
representation is unique within the canonical set. Also, as we mentioned
in the previous section, there is no such thing as an “invalid” set of Euler
angles. Even if the angles are outside the usual range, we can always agree
on what orientation is described by the Euler angles.
So for purposes of simply describing orientation, aliasing isn't a huge
problem, especially when canonical Euler angles are used. So what's so bad
about aliasing and Gimbal lock? Let's say we wish to interpolate between
two orientations R 0 and R 1 . In other words, for a given parameter t,
0 ≤ t ≤ 1, we wish to compute an intermediate orientation R (t) that
interpolates smoothly from R 0 to R 1 as t varies from 0 to 1. This is an
extremely useful operation for character animation and camera control, for
example.
R 0 =720°
R 1 =45°
+90°
90°
+270°
270°
Figure 8.9
Naıve interpolation
can cause excessive
rotation
±180°
 
Search WWH ::




Custom Search