Rotational Matrix Operations

Rotational Matrix Operations#

Functions

rotmat.rotx(phi)

Generate a 3x3 Direction Cosine Matrix for a positive rotation about the x-axis by an angle \(\phi\) in radians.

rotmat.roty(theta)

Generate a 3x3 Direction Cosine Matrix for a positive rotation about the y-axis by an angle \(\theta\) in radians.

rotmat.rotz(psi)

Generate a 3x3 Direction Cosine Matrix for a positive rotation about the z-axis by an angle \(\psi\) in radians.

rotmat.dcm321([phi, theta, psi])

Generate a 3x3 Direction Cosine Matrix (DCM) for a sequence of positive rotations around the axes in the following order: \(z\), then \(y\), then \(x\).

rotmat.dcm321euler(dcm)

Extract Euler angles (roll, pitch, yaw) from a Direction Cosine Matrix (DCM) of 3-2-1 order.

animate.animate(rb, modelpath[, angle0, ...])

Animate a rigidbody.