gruvoc.geom
: Geometry manipulation tools for gruvoc
¶
This module provides a series of functions that perform basic geometry
operations, such as rotate_points()
to rotate an array of points
about a vector specified as two end points.
- cape.gruvoc.geom.rotate_points(X: list | tuple | ndarray, v1: list | tuple | ndarray, v2: list | tuple | ndarray, theta: float | float32 | float64) ndarray ¶
Rotate an array of points about a vector defined by two points
- Call:
>>> Y = rotate_points(X, v1, v2, theta)
- Inputs:
- X:
np.ndarray
[float
] Coordinates of N points to rotate; shape is (N, 3)
- v1:
np.ndarray
[float
] Coordinates of start point of rotation vector; shape (3,)
- v2:
np.ndarray
[float
] Coordinates of end point of rotation vector; shape (3,)
- theta:
float
Angle by which to rotate X, in degrees
- X:
- Outputs:
- Y:
np.ndarray
[float
] Rotated points
- Y:
- cape.gruvoc.geom.translate_points(X: list | tuple | ndarray, v: list | tuple | ndarray) ndarray ¶
Translate an array of points
- Call:
>>> Y = translate_points(X, v)
- Inputs:
- X:
np.ndarray
[float
] Coordinates of N points to translate; shape is (N, 3)
- v:
np.ndarray
[float
] Vector by which to translate each point; shape (3,)
- X:
- Outputs:
- Y:
np.ndarray
[float
] Translated points
- Y: