cls_Quaternion - almarklein/visvis GitHub Wiki

Inherits from object.

A quaternion is a mathematically convenient way to describe rotations.

The Quaternion class implements the following methods:
conjugate, copy, create_from_axis_angle, create_from_euler_angles, exp, get_axis_angle, get_matrix, inverse, log, norm, normalize, rotate_point

Methods

Obtain the conjugate of the quaternion. This is simply the same quaternion but with the sign of the imaginary (vector) parts reversed.

Create an exact copy of this quaternion.

Classmethod to create a quaternion from an axis-angle representation. (angle should be in radians).

Classmethod to create a quaternion given the euler angles.

Returns the exponent of the quaternion. (not tested)

Get the axis-angle representation of the quaternion. (The angle is in radians)

Create a 4x4 homography matrix that represents the rotation of the quaternion.

returns q.conjugate()/q.norm()**2 So if the quaternion is unit length, it is the same as the conjugate.

Returns the natural logarithm of the quaternion. (not tested)

Returns the norm of the quaternion. norm = w2 + x2 + y2 + z2

Returns a normalized (unit length) version of the quaternion.

Rotate a Point instance using this quaternion.

⚠️ **GitHub.com Fallback** ⚠️