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.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
Returns: mat : array shape (3,3)
rotation matrix specified rotation
Notes
From: http://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle
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
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
Returns: q12 : shape (4,) array
Notes
See : http://en.wikipedia.org/wiki/Quaternions#Hamilton_product
quat2mat¶
-
transforms3d.derivations.quaternions.
quat2mat
(quat)¶ Symbolic conversion from quaternion to rotation matrix
For a unit quaternion
From: http://en.wikipedia.org/wiki/Rotation_matrix#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
Returns: quat : 4 element sequence of symbols
quaternion giving specified rotation
Notes
Formula from http://mathworld.wolfram.com/EulerParameters.html