java.lang.Object
org.jeometry.geom3D.algorithm.convexhull.quickhull.QuickHull

public class QuickHull
extends Object
This class provide convex hull computation for a set of points using the convex hull algorithm given in "The Quickhull Algorithm for Convex Hulls." ACM Trans. Mathematical Software 22, 469-483, 1996. by Barber, C. B.; Dobkin, D. P.; and Huhdanpaa, H. T. . The behavior of the algorithm follows:
  • At each step we select a triangle (shown in light blue), find the associated point that is furthest away (coloured differently) and add it to the hull. Then we delete the the selected triangle and any other triangles (shown in yellow) that can see this point.
  • Deleting the triangles makes a hole in the convex hull. Add a triangle to connect the new point to an edge of the hole. The points associated with the deleted triangles are reassigned to the new triangle if they can see it.
  • Repeat for each edge of the hole to finish connecting the new point to the remainder of the old hull. The points associated with the deleted triangles are reassigned to the first new triangle they can see. Points that can't see any of the new triangle are inside the hull and can be discarded.
  • Select a new triangle and repeat.
Since:
1.0.0
Version:
"1.0.5"
Author:
Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
  • Constructor Details

    • QuickHull

      public QuickHull()
  • Method Details

    • computeConvexHull

      public static <T extends Point3D> Mesh<T> computeConvexHull​(Point3DContainer<T> points, boolean useAklToussaint)
      Constructs the convex hull of a set of vertices. This method is the implementation of the algorithm given in: "The Quickhull Algorithm for Convex Hulls." ACM Trans. Mathematical Software 22, 469-483, 1996. by Barber, C. B.; Dobkin, D. P.; and Huhdanpaa, H. T.. The behavior of the algorithm follows:
      • At each step we select a triangle (shown in light blue), find the associated point that is furthest away (coloured differently) and add it to the hull. Then we delete the the selected triangle and any other triangles (shown in yellow) that can see this point.
      • Deleting the triangles makes a hole in the convex hull. Add a triangle to connect the new point to an edge of the hole. The points associated with the deleted triangles are reassigned to the new triangle if they can see it.
      • Repeat for each edge of the hole to finish connecting the new point to the remainder of the old hull. The points associated with the deleted triangles are reassigned to the first new triangle they can see. Points that can't see any of the new triangle are inside the hull and can be discarded.
      • Select a new triangle and repeat.
      Type Parameters:
      T - The type of underlying 3D points
      Parameters:
      points - the set of points used for computing the convex hull.
      useAklToussaint - true if the algorithm has to use Akl-Toussaint heuristic or false otherwise.
      Returns:
      the computed convex hull represented as a Mesh.