DelaunayTri

Class: DelaunayTri

(Will be removed) Construct Delaunay triangulation

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.

Definitions

The 2-D Delaunay triangulation of a set of points is the triangulation in which no point of the set is contained in the circumcircle for any triangle in the triangulation. The definition extends naturally to higher dimensions.

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.

Was this topic helpful?