convexHull
Convex hull of the points of a Delaunay triangulation, as point indices.
Category: Mathematics > Computational Geometry
Syntax
K = convexHull(DT)
Returns the hull of the triangulation DT.
Description
The convex hull is the smallest convex region that contains all the points. Because the triangulation already knows its outer edges, convexHull simply reads them off. The indices refer to rows of DT.Points.
For points that are not already triangulated, convhull computes the hull directly.
Input arguments
DT- A
delaunayTriangulationobject (or a legacyDelaunayTri).
Output arguments
K- In 2-D, a column of point indices that goes around the hull and repeats the first index at the end. In 3-D, a three-column matrix of triangular faces.
Example
Hull of a tetrahedron
P = [0 0 0; 1 0 0; 0 1 0; 0 0 1];
DT = delaunayTriangulation(P);
K = convexHull(DT)
Output
K = 4×3
1 2 4
1 3 2
1 4 3
2 3 4