def get_alpha_complex(alpha, points, simplexes):
"""Obtain the alpha shape.
Args:
alpha (float): the paramter for the alpha shape
points: data points
simplexes: the list of indices that define 2-simplexes in the Delaunay
triangulation
"""
return filter(lambda simplex: circumcircle(points, simplex)[1] < alpha,
simplexes)
评论列表
文章目录