Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

DelaunayTri - Class: DelaunayTri

Contruct 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, ndim>= 2 . 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.

Example

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.

References

DelaunayTri uses CGAL—The Computational Geometry Algorithms Library. (http://www.cgal.org)

See Also

TriScatteredInterp
  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS