Package net.imglib2.mesh.alg.hull
Class ConvexHull
- java.lang.Object
-
- net.imglib2.mesh.alg.hull.ConvexHull
-
public class ConvexHull extends Object
This quickhull implementation is based on the paper "The Quickhull Algorithm for Convex Hulls" by Barber, Dobkin and Huhdanpaa (http://dpd.cs.princeton.edu/Papers/BarberDobkinHuhdanpaa.pdf). The computation of the initial simplex is inspired by John Lloyd's quickhull implementation (http://www.cs.ubc.ca/~lloyd/java/quickhull3d.html).- Author:
- Tim-Oliver Buchholz (University of Konstanz)
-
-
Constructor Summary
Constructors Constructor Description ConvexHull()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NaiveDoubleMeshcalculate(Mesh input)Computes the convex hull of aMeshstatic doublecalculateEpsilon(Mesh input)Computes the tolerance (epsilon) of the Mesh.static doublelastEpsilon()Returns the epsilon value of the last computed convex hull.
-
-
-
Method Detail
-
calculate
public static NaiveDoubleMesh calculate(Mesh input)
Computes the convex hull of aMesh- Parameters:
input- the inputMesh- Returns:
- the convex hull of
input - Implementation Note:
- op names="geom.convexHull"
-
calculateEpsilon
public static double calculateEpsilon(Mesh input)
Computes the tolerance (epsilon) of the Mesh.The convex hull algorithm implemented is susceptible to errors from the numerical imprecision of floating point arithmetic. In John Lloyd's quickhull implementation, which our implementation follows, these errors usually arise in the form of nonconvex edges, which the quickhull algorithm merges. Given two faces joined by an edge, the edge is considered nonconvex if the centroid of either face is "sufficiently below" the plane of the other face. "Sufficiently below", in this case, means greater than the tolerance, which is computed from the point list.
-
lastEpsilon
public static double lastEpsilon()
Returns the epsilon value of the last computed convex hull.- Returns:
- the epsilon value of the last computed convex hull.
-
-