# derivations¶

## Module: derivations.angle_axes¶

Derivations for rotations of angle around axis

 angle_axis2mat(theta, vector) Rotation matrix of angle theta around vector angle_axis2quat(theta, vector) Quaternion for rotation of angle theta around vector orig_aa2mat(angle, direction) quat2angle_axis(quat) Convert quaternion to rotation of angle around axis

## Module: derivations.decompositions¶

Derivations for extracting rotations, zooms, shears

## Module: derivations.eulerangles¶

These give the derivations for Euler angles to rotation matrix and Euler angles to quaternion. We use the rotation matrix derivation only in the tests. The quaternion derivation is in the tests, and, in more compact form, in the euler2quat code.

The rotation matrices operate on column vectors, thus, if R is the 3x3 rotation matrix, v is the 3 x N set of N vectors to be rotated, and vdash is the matrix of rotated vectors:

vdash = np.dot(R, v)

 x_rotation(theta) Rotation angle theta around x-axis y_rotation(theta) Rotation angle theta around y-axis z_rotation(theta) Rotation angle theta around z-axis

## Module: derivations.quaternions¶

Symbolic formulae for quaternions

 qmult(q1, q2) Multiply two quaternions quat2mat(quat) Symbolic conversion from quaternion to rotation matrix quat_around_axis(theta, axis) Quaternion for rotation of angle theta around axis axis

## Module: derivations.utils¶

Utilities for derivations

 make_matrix(name_prefix, N, M) matrices_equal(M1, M2) matrix_simplify(M)

### angle_axis2mat¶

transforms3d.derivations.angle_axes.angle_axis2mat(theta, vector)

Rotation matrix of angle theta around vector

Parameters: theta : scalar angle of rotation vector : 3 element sequence vector specifying axis for rotation. is_normalized : bool, optional True if vector is already normalized (has norm of 1). Default False mat : array shape (3,3) rotation matrix specified rotation

Notes

### angle_axis2quat¶

transforms3d.derivations.angle_axes.angle_axis2quat(theta, vector)

Quaternion for rotation of angle theta around vector Notes —– Formula from http://mathworld.wolfram.com/EulerParameters.html

### orig_aa2mat¶

transforms3d.derivations.angle_axes.orig_aa2mat(angle, direction)

### quat2angle_axis¶

transforms3d.derivations.angle_axes.quat2angle_axis(quat)

Convert quaternion to rotation of angle around axis

### x_rotation¶

transforms3d.derivations.eulerangles.x_rotation(theta)

Rotation angle theta around x-axis http://en.wikipedia.org/wiki/Rotation_matrix#Dimension_three

### y_rotation¶

transforms3d.derivations.eulerangles.y_rotation(theta)

Rotation angle theta around y-axis http://en.wikipedia.org/wiki/Rotation_matrix#Dimension_three

### z_rotation¶

transforms3d.derivations.eulerangles.z_rotation(theta)

Rotation angle theta around z-axis http://en.wikipedia.org/wiki/Rotation_matrix#Dimension_three

### qmult¶

transforms3d.derivations.quaternions.qmult(q1, q2)

Multiply two quaternions

Parameters: q1 : 4 element sequence q2 : 4 element sequence q12 : shape (4,) array

Notes

### quat2mat¶

transforms3d.derivations.quaternions.quat2mat(quat)

Symbolic conversion from quaternion to rotation matrix

For a unit quaternion

### quat_around_axis¶

transforms3d.derivations.quaternions.quat_around_axis(theta, axis)

Quaternion for rotation of angle theta around axis axis

Parameters: theta : symbol angle of rotation axis : 3 element sequence vector (assumed normalized) specifying axis for rotation quat : 4 element sequence of symbols quaternion giving specified rotation

Notes

### make_matrix¶

transforms3d.derivations.utils.make_matrix(name_prefix, N, M)

### matrices_equal¶

transforms3d.derivations.utils.matrices_equal(M1, M2)

### matrix_simplify¶

transforms3d.derivations.utils.matrix_simplify(M)