Main Content

Approaches for Computing the Convex Hull

MATLAB® provides several ways to compute the convex hull:

The convhull function supports the computation of convex hulls in 2-D and 3-D. The convhulln function supports the computation of convex hulls in N-D (N ≥ 2). The convhull function is recommended for 2-D or 3-D computations due to better robustness and performance.

The delaunayTriangulation class supports 2-D or 3-D computation of the convex hull from the Delaunay triangulation. This computation is not as efficient as the dedicated convhull and convhulln functions. However, if you have a delaunayTriangulation of a point set and require the convex hull, the convexHull method can compute the convex hull more efficiently from the existing triangulation.

The alphaShape function also supports the 2-D or 3-D computation of the convex hull by setting the alpha radius input parameter to Inf. Like delaunayTriangulation, however, computing the convex hull using alphaShape is less efficient than using convhull or convhulln directly. The exception is when you are working with a previously created alpha shape object.

See Also

| | | |