discretize.utils.rotate_points_from_normals

discretize.utils.rotate_points_from_normals(XYZ, n0, n1, x0=array([0., 0., 0.]))[source]

rotates a grid so that the vector n0 is aligned with the vector n1

Parameters
  • n0 (numpy.array) – vector of length 3, should have norm 1

  • n1 (numpy.array) – vector of length 3, should have norm 1

  • x0 (numpy.array) – vector of length 3, point about which we perform the rotation

Return type

numpy.array, 3x3

Returns

rotation matrix which rotates the frame so that n0 is aligned with n1