DT = delaunay( creates a
2-D or 3-D Delaunay triangulation from the points in a matrix
DT is a three-column (for two dimensions) or four-column (for
three dimensions) matrix where each row contains the row indices of the input points that
make up a triangle or tetrahedron in the triangulation.
2-D Delaunay Triangulation
Create a set of 2-D points. Compute and plot the Delaunay triangulation.
rng default; x = rand([20,1]); y = rand([20,1]); DT = delaunay(x,y); triplot(DT,x,y);
P — Points
Points, specified as a matrix whose columns are the
x-coordinates, y-coordinates, and (possibly)
z-coordinates of the triangulation points. Each row of the output
DT contains the row numbers of
P that make up a
single triangle or tetrahedron in the triangulation.
x — x-coordinates
x-coordinates, specified as a column vector.
y — y-coordinates
y-coordinates, specified as a column vector.
z — z-coordinates
z-coordinates, specified as a column vector.
tetrameshfunctions to plot the output of
For more functionality with Delaunay triangulations, consider creating a
delaunayTriangulationobject and using object functions to compute geometric quantities and query properties of the triangulation.
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Introduced before R2006a