Game Development Reference
In-Depth Information
Euler angles are quite easy to both visualize and implement, which is why they are
used so often. To convert a set of Euler angles into a rotation matrix, all we need
to do is generate three matrices for the rotations around each of the axes and then
multiply them together.
However, this is where the problem with Euler angles lies. Matrix multiplication
yields different results depending on the order in which you multiply the matrices;
so when using Euler angles, it is vital that you choose the order of multiplication
carefully, depending on what you are trying to achieve. The following diagram
shows an example to illustrate this:
In the diagram, we are rotating an arrow that points straight along the positive
y axis. In the first row we rotate by 90 degrees around the z axis and then by 90
degrees around the y axis. The arrow ends up pointing along the z axis.
In the second row of the diagram, we take the same original arrow but apply the
rotations in the opposite order. As you can see, this time the arrow finishes in the
direction of the x axis.
 
Search WWH ::




Custom Search