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: float

Get rotation angle around y axis in radians.

Return type

float

property quaternion: pyquaternion.quaternion.Quaternion

Get the quaternion represented by this orientation.

Return type

Quaternion

property roll: float

Get rotation angle around x axis in radians.

Return type

float

property rot_x: float

Get rotation angle around x axis in radians.

Return type

float

property rot_y: float

Get rotation angle around y axis in radians.

Return type

float

property rot_z: float

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: float

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.

PixelCoordinates

class zoloto.coords.PixelCoordinates(x: float, y: float)[source]

Coordinates within an image made up from pixels.

This type allows float values to account for computed locations which are not limited to exact pixel boundaries.

Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

x: float

Alias for field number 0

y: float

Alias for field number 1

CartesianCoordinates

class zoloto.coords.CartesianCoordinates(x: float, y: float, z: float)[source]
Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

  • z (float) – Z coordinate

x: float

Alias for field number 0

y: float

Alias for field number 1

z: float

Alias for field number 2

SphericalCoordinates

class zoloto.coords.SphericalCoordinates(rot_x: float, rot_y: float, dist: int)[source]
Parameters
  • rot_x (float) – Rotation around the X-axis, in radians

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

  • dist (float) – Distance

dist: int

Alias for field number 2

rot_x: float

Alias for field number 0

rot_y: float

Alias for field number 1

Quaternion

class pyquaternion.quaternion.Quaternion

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