Skip to content

Auxiliary

get_rotationMatrix_from_vectors

get_rotationMatrix_from_vectors(u, v)

Create a rotation matrix that rotates the space from a 3D vector u to a 3D vector v

Arguments:

  • u: Orign vector np.array (1,3).
  • v: Destiny vector np.array (1,3).

Returns:

Rotation matrix np.array (3, 3)


rodrigues_rot

rodrigues_rot(P, n0, n1)

Rotate a set of point between two normal vectors using Rodrigues' formula.

Arguments:

  • P: Set of points np.array (N,3).
  • n0: Orign vector np.array (1,3).
  • n1: Destiny vector np.array (1,3).

Returns:

Set of points P, but rotated np.array (N, 3)