alpha_shape#

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

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). Internal boundaries can be ignored by setting internal_boundaries to False.

Parameters:
pointsnp.ndarray

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

alphafloat

Alpha value to influence the shape.

only_outerbool, optional

If True, keep only the outer border. If False, include inner edges as well. Default is True.

internal_area_thresholdfloat, optional

Threshold for the area of internal boundaries to be included. Default is 0.

internal_boundariesbool, optional

If True, include internal boundaries. Default is True.

Returns:
list

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).