This document defines the rotation methods used for calculating node rotations in Drive3D Documents.
In DriveWorks we create rotations with 3 values (in degrees). One for each axis to rotate around, which are referred to as the X, Y and Z axes. This is known as a Euler rotation. We use Euler rotation in the 3D Document because it’s by far the most human comprehensible way to describe 3D rotations, as we can do things in terms of degrees and/or radians. Other methods of describing rotation such as Quaternions or Rotation Matrices are far more difficult to read and understand, and therefore harder for the user to get anything done.
One of the limitations of Euler rotation is gimbal lock. This is where one of the 3 rotations lines the other 2 axes up, making them rotate around the same axis. This means you lose one degree of freedom for that single rotation. This is only apparent at values close to 90 degrees and only for certain combinations of axes. This never affects other rotations. So rotations created by rules, will never be affected by Gimbal Lock in the static rotation from the Transform property editor. Nor will parent or child Nodes be affected.
We apply the Euler rotation in the order ‘YXZ’. This means Y and Z are always safe from causing gimbal lock. But rotating X can cause the Z rotation to apply on the same plane as the Y rotation.
Rotating any axis however can cause one of the X/Y/Z rotations to appear to apply to a different axis. While this isn’t Gimbal Lock and you can still get the desired rotation, it can still be confusing.
When in a situation where Gimbal Lock is preventing the desired rotation, or just to avoid confusion, split the rotation out into multiple rotations, each around a single axis. This can be done by applying single rotations on parented nodes, with each parent node rotating about a single axis, or by applying rotations via rules.
Wikipedia has an excellent page on Gimbal Lock, with some accompanying YouTube videos that explain rotation graphically.
|Knowledge Base Article Ref:||KB17040301|