pystran.rotation module#

Define rotation utilities.

pystran.rotation.rotate(i, j, v, angleindegrees)[source]#

Rotate a 3D vector v by an angle about the unit vector defined by joints i and j.

Parameters:
  • i – First joint.

  • j – Second joint.

  • v – Vector to be rotated. Can be supplied as a list, tuple, or array.

  • angleindegrees – Angle in degrees. Positive when counterclockwise about the vector j["coordinates"] - i["coordinates"].

Returns:

Rotated vector v.

Return type:

array

pystran.rotation.rotmat3(rotvec)[source]#

Compute a 3D rotation matrix from a rotation vector.

Parameters:

rotvec – Array: rotation vector.

Return type:

array