polynomials_on_simplices.linalg.rigid_motion module

Rigid motions (elements of \(SE(3)\)).

move(rotation, translation, v)[source]

Move a vector or set of vectors using a rigid motion. The rigid body motion is composed of a rotation followed by a translation.

Parameters:
  • rotation – Rotation part of the rigid motion (rotation matrix).
  • translation – Translation part of the rigid motion (3d vector).
  • v – Vector(s) to move (specified as columns in a matrix).
Returns:

Moved vector(s).

random_rigid_motion(radius=1.0, n=3)[source]

Generate a random rigid motion with finite translation.

Parameters:
  • radius – Translation vector will be uniformly sampled from the ball with this radius.
  • n – Dimension of the space in which the generated rigid motion acts.
Returns:

Tuple of a rotation and a translation (orthogonal 3x3 matrix and 3d vector in 3d, orthogonal 2x2 matrix and 2d vector in 2d).

translate(translation, v)[source]

Translate a vector or set of vectors.

Parameters:
  • translation – Translation (3d vector).
  • v – Vector(s) to translate (specified as columns in a matrix).
Returns:

Translated vector(s).