Surface Module

Alpha-shape Algorithms

Primitives and algorithms for determining alpha-shape of collection of points.

czone.surface.alpha_shape.alpha_shape_alg_3D(points, probe_radius, return_alpha_shape=False)

Use alpha shape algorithm to determine points on exterior of collection of points.

Performs alpha-shape algorithm ##TODO: cite a source here

Parameters
  • points (np.ndarray) – Nx3 array representing coordinates of points in object

  • probe_radius (float) – radius of test

  • return_alpha_shape (bool) – return dictionary of alpha shape arrays, default False.

Returns

List of indices of points on exterior of surface for given alpha-shape.

czone.surface.alpha_shape.alpha_shape_alg_3D_with_sampling(points, probe_radius, N_samples, std=0.0001, rng=None, seed=None, return_alpha_shape=False)

Use alpha shape algorithm to determine points on exterior of collection of points.

Performs alpha-shape algorithm ##TODO: cite a source here

Parameters
  • points (np.ndarray) – Nx3 array representing coordinates of points in object

  • probe_radius (float) – radius of test

  • return_alpha_shape (bool) – return dictionary of alpha shape arrays, default False.

Returns

List of indices of points on exterior of surface for given alpha-shape.

czone.surface.alpha_shape.tetrahedron_circumradii(points)

Calculates circumradii of set of tetrahedron. Vectorized code.

vectorized version of adapted code from https://github.com/python-adaptive/adaptive uses determinants to calculate circumradius of tetrahedron, ref: https://mathworld.wolfram.com/Circumsphere.html

Parameters

points (np.ndarray) – Nx4x3 array of points, representing vertices of N tetrahedra.

Returns

np.ndarray of circumradii of tetrahedra

Adsorbate Algorithms