API Reference

This section contains the complete API reference for PolytopAX.

Overview

PolytopAX provides both high-level object-oriented APIs and low-level functional APIs:

  • High-level API: polytopax.ConvexHull class for easy-to-use convex hull operations

  • Low-level API: Individual functions for custom workflows and advanced usage

  • Utilities: Helper functions for validation, preprocessing, and geometric computations

Quick Reference

Main Classes:

ConvexHull(vertices, faces, algorithm_info, ...)

JAX-compatible ConvexHull class with object-oriented API.

Core Functions:

convex_hull(points[, algorithm])

Compute convex hull of a set of points.

approximate_convex_hull(points[, ...])

Differentiable approximate convex hull computation.

Geometric Predicates:

point_in_convex_hull(point, hull_vertices[, ...])

Test if point is inside convex hull.

convex_hull_volume(vertices[, method])

Compute volume of convex hull (differentiable).

convex_hull_surface_area(vertices[, faces])

Compute surface area of convex hull.

distance_to_convex_hull(point, hull_vertices)

Compute distance from point to convex hull.

hausdorff_distance(hull1_vertices, ...)

Compute Hausdorff distance between two convex hulls.

Utility Functions:

get_info()

Get PolytopAX package information.

validate_point_cloud(points)

Validate point cloud shape and numerical validity.

generate_direction_vectors(dimension, ...[, ...])

Generate direction vectors for sampling.

Detailed Documentation

Module Structure

The PolytopAX library is organized into several modules:

  • polytopax.core - Core data structures and main APIs

  • polytopax.algorithms - Convex hull algorithms and approximation methods

  • polytopax.operations - Geometric predicates and operations

Each module contains related functionality and can be imported independently for advanced usage.