Coordinates

Orientation

class zoloto.coords.Orientation(e_x, e_y, e_z)[source]

The orientation of an object in 3-D space.

__init__(e_x, e_y, e_z)[source]

Construct a quaternion given the components of a rotation vector.

More information: https://w.wiki/Fci

__iter__()[source]

Get an iterator over the rotation angles.

Returns:

An iterator of floating point angles in order x, y, z.

Return type

Iterator[float]

property pitch

Get rotation angle around y axis in radians.

Return type

float

property quaternion

Get the quaternion represented by this orientation.

Return type

Quaternion

property roll

Get rotation angle around x axis in radians.

Return type

float

property rot_x

Get rotation angle around x axis in radians.

Return type

float

property rot_y

Get rotation angle around y axis in radians.

Return type

float

property rot_z

Get rotation angle around z axis in radians.

Return type

float

rotation_matrix

Get the rotation matrix represented by this orientation.

Returns:

A 3x3 rotation matrix as a tuple of tuples.

property yaw

Get rotation angle around z axis in radians.

Return type

float

yaw_pitch_roll

Get the equivalent yaw-pitch-roll angles.

Specifically intrinsic Tait-Bryan angles following the z-y’-x’’ convention.

Returns:

A three-tuple of floating point angles:

yaw: rotation angle around the z-axis in radians, in the range [-pi, pi]

pitch: rotation angle around the y’-axis in radians, in the range [-pi/2, -pi/2]

roll: rotation angle around the x’‘-axis in radians, in the range [-pi, pi]

Coordinates

class zoloto.coords.Coordinates
Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

property x

Alias for field number 0

property y

Alias for field number 1

ThreeDCoordinates

class zoloto.coords.ThreeDCoordinates
Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

  • z (float) – Z coordinate

property x

Alias for field number 0

property y

Alias for field number 1

property z

Alias for field number 2

Spherical

class zoloto.coords.Spherical
Parameters
  • rot_x (float) – Rotation around the X-axis, in radians

  • rot_y (float) – Rotation around the Y-axis, in radians

  • dist (float) – Distance

property dist

Alias for field number 2

property rot_x

Alias for field number 0

property rot_y

Alias for field number 1

Quaternion

class pyquaternion.quaternion.Quaternion

See https://kieranwynn.github.io/pyquaternion/