polytopax.convex_hull_volume

polytopax.convex_hull_volume(vertices: Array, method: str = 'simplex_decomposition') Array[source]

Compute volume of convex hull (differentiable).

Parameters:
  • vertices – Hull vertices with shape (…, n_vertices, dim)

  • method – Volume computation method - “simplex_decomposition”: Decompose into simplices - “shoelace”: Shoelace formula (2D only) - “divergence_theorem”: Use divergence theorem (3D only) - “monte_carlo”: Monte Carlo estimation - “multi_method”: Consensus across multiple methods

Returns:

Volume of the convex hull (d-dimensional measure)

Note

For d-dimensional space, volume is the d-dimensional measure. For 2D, this is area; for 3D, this is volume; etc.