pygeon.utils.sort_points module
- pygeon.utils.sort_points.argsort_ccw_convex(pts)[source]
Sorts the given points in counterclockwise order based on their angles with respect to the centroid.
- Parameters:
pts (np.ndarray) – Array of points with shape (N, 2), where N is the number of points.
- Returns:
Array of indices that represents the sorted order of the points in counterclockwise direction.
- Return type:
np.ndarray