sdynpy.signal_processing.sdynpy_rotation.R

R(axis, angle, degrees=False)[source]

Create a rotation matrix consisting of a rotatoin about an axis

Parameters
  • axis (index or np.ndarray) – The axis of rotation. Specifying 0, 1, or 2 will construct a rotation about the X, Y, or Z axes, respectively. Alternatively, the axis of rotation can be specficied as a 3-vector.

  • angle (float) – The angle of rotation

  • degrees (bool, optional) – True if the angle value is specified in degrees, false if radians. The default is False.

Raises

ValueError – If an improper axis is specified.

Returns

rotmat – A 3x3 rotation matrix.

Return type

np.ndarray