Module vectors
source code
Collection of functions for vector operations.
|
__package__ = ' lib.geometry '
|
Imports:
acos,
cos,
pi,
sin,
array,
float64,
norm,
uniform
Generate a random rotation axis.
Uniform point sampling on a unit sphere is used to generate a random
axis orientation.
- Parameters:
vector (numpy 3D, rank-1 array) - The 3D rotation axis.
|
Generate the unit vector connecting point 1 to point 2.
- Parameters:
point1 (list of float or numpy array) - The first point.
point2 (list of float or numpy array) - The second point.
- Returns: numpy float64 array
- The unit vector.
|