Class ConvexHull3D

java.lang.Object
org.episteme.core.mathematics.geometry.ConvexHull3D

public final class ConvexHull3D extends Object
3D Convex Hull implementation using the Quickhull algorithm.

Time complexity: O(n log n) average case, O(n²) worst case.

The Quickhull algorithm:

  1. Find extreme points to form initial tetrahedron
  2. Partition remaining points by which face they're "above"
  3. Recursively process each face with associated points
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Method Details

    • compute

      public static List<ConvexHull3D.Face> compute(List<Point3D> points)
      Computes the 3D convex hull of a set of points.
      Parameters:
      points - input points
      Returns:
      list of triangular faces forming the hull
    • computePolyhedron

      public static ConvexPolyhedron3D computePolyhedron(List<Point3D> points)
      Creates a ConvexPolyhedron3D from the hull.
      Parameters:
      points - the input points
      Returns:
      a convex polyhedron boundary
    • computeVolume

      public static Real computeVolume(List<Point3D> points)
      Computes the volume of the convex hull.
      Parameters:
      points - the input points
      Returns:
      the volume
    • computeSurfaceArea

      public static Real computeSurfaceArea(List<Point3D> points)
      Computes the surface area of the convex hull.
      Parameters:
      points - the input points
      Returns:
      the surface area
    • contains

      public static boolean contains(List<Point3D> hullPoints, Point3D query)
      Checks if a point is inside the convex hull.
      Parameters:
      hullPoints - the points that define the hull
      query - the point to test
      Returns:
      true if inside