Rotations in 3D applications are usually represented in one of two ways, Quaternion or Euler angles. Each has its own uses and drawbacks.
DriveWorks uses Quaternion units internally, but surfaces the equivalent Euler angle to make it easy to edit.
Euler angles have a simple representation. They are represented by three angle values for Y, X and Z that are applied sequentially. To apply a Euler rotation to a particular node, each rotation value is applied in turn, as a rotation around its corresponding axis.
Standard Gimbal | X Rotation | Gimbal Lock |
---|---|---|
Quaternions are used to represent the orientation or rotation of a node. DriveWorks stores the orientation of each node in 3D Space as a Quaternion and this represents a rotation in 3D Space.
In DriveWorks all node rotations are stored internally as Quaternions.
In DriveWorks Administrator the rotation values are displayed in Euler angles. This is more easily understood and edited.
A side effect of Quaternions is that it is possible for a DriveWorks 3D Document to display a different Euler angle than the value that is entered.
For example:
Entering an angle of 365 degrees for the X Rotation of a node will result in a value of 5 degrees being shown.
This is because the rotation was converted to a Quaternion which does not have the concept of a full 360 degree rotation plus 5 degrees. Instead this has simply been represented by the value 5, the result of the rotation.