cartagen.circle_interpolation#
- circle_interpolation(a: ndarray, b: ndarray, c: ndarray, rotation: Literal['cw', 'ccw'] = 'cw', quad_segs: int = 8, tolerance: float = 1e-09) ndarray#
Interpolate points along a circle arc.
Given b and c, two points at equal distance from a third point a, interpolates n points between b and c along the circle of center a and radius ab. The number of provided points depends on the number of segments allowed per circle quadrant.
- Parameters:
a (
ndarray,shape (2,)) – Center point coordinatesb (
ndarray,shape (2,)) – Start point coordinatesc (
ndarray,shape (2,)) – End point coordinatesrotation (
{'cw', 'ccw'}, optional) – Define the rotation direction: - ‘cw’: clockwise - ‘ccw’: counterclockwise (plane symmetry of cw using line ab) Default is ‘cw’.quad_segs (
int, optional) – The number of segments allowed on a quarter circle. This defines the resolution of interpolated points. Must be at least 1. Default is 8.tolerance (
float, optional) – Numerical tolerance for distance and vector comparisons. Default is 1e-9.
- Returns:
ndarray,shape (n_points,2)– Array of interpolated points