alpha_shape#

alpha_shape(points, alpha, internal_area_threshold=0, internal_boundaries=True, return_connected_components=False)#

Compute the alpha shape of a set of points. The alpha shape returns a list of boundary points together with a list of internal boundary points, (the format required by MuSpAn to make a list of shape objects).

Parameters:
pointsnp.ndarray

Array of shape (k, 2) containing the points.

alphafloat

Alpha value to influence the shape.

return_connected_componentsbool, optional

If True, also returns an array indicating which connected component each point belongs to in the Delaunay Triangulation post edge length filtering. Default is False.

Returns:
alpha_shapeslist

A list where each element is a tuple containing the outer boundary points (m, 2) and a list of internal boundary points, each of shape (n_i, 2).

If return_connected_components is True:
point_component_labelsnp.ndarray

An array of shape (k,) indicating which connected component each point belongs to.

Notes

Both internal_area_threshold and internal_boundaries are legacy arguments and are no longer used.