discretize.utils.rotate_points_from_normals#
- discretize.utils.rotate_points_from_normals(xyz, v0, v1, x0=array([0., 0., 0.]))[source]#
Rotate a set of xyz locations about a specified point.
Rotate a grid of Cartesian points about a location x0 according to the rotation defined from vector v0 to v1.
Let
represent an input xyz location, let be the origin of rotation, and let denote the rotation matrix from vector v0 to v1. Where is the new xyz location, this function outputs the following operation for all input locations:- Parameters:
- xyz(
n
, 3)numpy.ndarray
locations to rotate
- v0(3)
numpy.ndarray
Starting orientation direction
- v1(3)
numpy.ndarray
Finishing orientation direction
- x0(3)
numpy.ndarray
,optional
The origin of rotation.
- xyz(
- Returns:
- (
n
, 3)numpy.ndarray
The rotated xyz locations.
- (