OOF2: The Manual

Name

Quaternion (Quaternion) — The Quaternion representation for 3D orientations. e0 is the cosine of the half-angle of the rotation, and e1 through e3 are the x, y, and z components of the rotation axis times the sine of the half-angle. The rotation brings the crystal axes into coincidence with the lab axes.

Synopsis

Quaternion(e0, e1, e2, e3)

Details

  • Base class: Orientation
  • Parameters:

    e0
    Cosine of half the rotation angle. Type: A real number.
    e1
    Rotation axis x-component times sine of half the rotation angle. Type: A real number.
    e2
    Rotation axis y-component times sine of half the rotation angle. Type: A real number.
    e3
    Rotation axis z-component times sine of half the rotation angle. Type: A real number.

Description

A Quaternion object represents the orientation of a three dimensional object, assumed to be a crystal, in three dimensional space in terms of four parameters which obey an interesting algebra. This representation of orientations is not common, but has its roots in the rigid-body mechanics community.

The parameters correspond to a physical rotation in a similar way to the Axis convention. Given a rotation angle ฮธ and a normalized rotation axis ๐ง^ , the quaternion parameters follow directly: e0 is the cosine of half the rotation angle, and e1 , e2 , and e3 are, respectively, the x, y, and z components of ๐ง^ multiplied by the sine of half the rotation angle.

As in the case of the Axis convention, the specified rotation brings the crystalline ๐š^ , ๐›^ , and ๐œ^ axes into coincidence with the laboratory (or screen) axes ๐ฑ^ , ๐ฒ^ , and ๐ณ^ respectively. The components of ๐ง^ are preserved by this rotation, and so may be specified in either the crystalline or laboratory coordinate system.