Alpha Shape and Alpha Hull#
Se muestra el uso de Alpha Shape y Alpha Hull con diferentes valores de alpha.
from proximitygraphs import Alpha_Hull, Alpha_Shape, SetPoints
uniform_sphere = SetPoints.uniform_sphere(n=200, seed=0)
for a in [-5, -3, -0.6, 0.5, 0.8, 1]:
H = Alpha_Hull(uniform_sphere, alpha=a, n_points_per_arc=50)
H.draw(title=True, details=True, figsize=(3,3), v_size=5, e_size=1, v_color='red', e_color='blue', fontsize=10, v_alpha=0.4, e_alpha=0.2)
for a in [-5, -3, -0.6, 0.5, 0.8, 1]:
H = Alpha_Shape(uniform_sphere, alpha=a)
H.draw(title=True, details=True, figsize=(3,3), v_size=5, e_size=1, v_color='red', e_color='blue', fontsize=10, v_alpha=0.4, e_alpha=0.2)
normal = SetPoints.normal_dist(n=100_000, seed=0)
H = Alpha_Shape(normal, alpha=0.00001)
H.draw(title=True, details=True, figsize=(3,3), v_size=5, e_size=1, v_color='red', e_color='blue', v_alpha=0.1, e_alpha=1)
(<Figure size 300x300 with 1 Axes>,
<Axes: title={'center': 'Alpha-Shape\nalpha=1e-05'}>)
H = Alpha_Shape(normal, alpha=-4)
H.draw(title=True, details=True, figsize=(3,3), v_size=5, e_size=1, v_color='red', e_color='blue', v_alpha=0.1, e_alpha=1)
(<Figure size 300x300 with 1 Axes>,
<Axes: title={'center': 'Alpha-Shape\nalpha=-4'}>)