DelaunayTri

Class: DelaunayTri

(Not recommended) Construct Delaunay triangulation

Compatibility

Note

DelaunayTri is not recommended. Use delaunayTriangulation instead.

Syntax

DT = DelaunayTri()
DT = DelaunayTri(X)
DT = DelaunayTri(x,y)
DT = DelaunayTri(x,y,z)
DT = DelaunayTri(..., C)

Description

DT = DelaunayTri() creates an empty Delaunay triangulation.

DT = DelaunayTri(X), DT = DelaunayTri(x,y) and DT = DelaunayTri(x,y,z) create a Delaunay triangulation from a set of points. The points can be specified as an mpts-by-ndim matrix X, where mpts is the number of points and ndim is the dimension of the space where the points reside, where ndim is 2 or 3. Alternatively, the points can be specified as column vectors (x,y) or (x,y,z) for 2-D and 3-D input.

DT = DelaunayTri(..., C) creates a constrained Delaunay triangulation. The edge constraints C are defined by an numc-by-2 matrix, numc being the number of constrained edges. Each row of C defines a constrained edge in terms of its endpoint indices into the point set X. This feature is only supported for 2-D triangulations.

Examples

Compute the Delaunay triangulation of twenty random points located within a unit square.

x = rand(20,1);
y = rand(20,1);
dt = DelaunayTri(x,y)
triplot(dt);

For more examples, type help demoDelaunayTri at the MATLAB® command-line prompt.

More About

expand all