Class: DelaunayTri
(Not recommended) Convex hull
Note
convexHull(DelaunayTri)
is not recommended. Use convexHull(delaunayTriangulation)
instead.
DelaunayTri
is not recommended. Use delaunayTriangulation
instead.
K = convexHull(DT)
[K AV] = convexHull(DT)
K = convexHull(DT)
returns the indices into the array of points
DT.X
that correspond to the vertices of the convex hull.
[K AV] = convexHull(DT)
returns the convex hull and the area or
volume bounded by the convex hull.
DT | Delaunay triangulation. |
K | If the points lie in 2-D space, K is a column
vector of length numf . Otherwise K
is a matrix of size numf -by-ndim ,
numf being the number of facets in the convex
hull, and ndim the dimension of the space where the
points reside. |
AV | The area or volume of the convex hull. |
Compute the convex hull of a set of random points located within a unit square in 2-D space.
x = rand(10,1) y = rand(10,1) dt = DelaunayTri(x,y) k = convexHull(dt) plot(dt.X(:,1),dt.X(:,2), '.', 'markersize',10); hold on; plot(dt.X(k,1),dt.X(k,2), 'r'); hold off;
Compute the convex hull of a set of random points located within a unit cube in 3-D space, and the volume bounded by the convex hull.
X = rand(25,3) dt = DelaunayTri(X) [ch v] = convexHull(dt) trisurf(ch, dt.X(:,1),dt.X(:,2),dt.X(:,3), 'FaceColor', 'cyan')
convhull
| convhulln
| delaunayTriangulation
| triangulation
| voronoiDiagram