delaunayn
Delaunay triangulation of points in n dimensions.
Category: Mathematics > Computational Geometry
Syntax
T = delaunayn(P)
Returns the simplices of the triangulation of the points in the rows of P.
Description
delaunayn is the dimension-independent counterpart of delaunay. In 3-D it returns tetrahedra; the same code path serves any dimension, whereas delaunay is limited to two or three.
Four points that are the corners of a tetrahedron, for instance, give a single row with the four indices.
Input arguments
P- Matrix with one point per row and one column per dimension.
Output arguments
T- One row per simplex, with
n + 1point indices each: triangles in 2-D, tetrahedra in 3-D.
Example
A single tetrahedron
P = [0 0 0; 1 0 0; 0 1 0; 0 0 1];
T = delaunayn(P)
Output
T = 1×4
1 2 3 4