Function Reference
— Function File: T = delaunayn (P)
— Function File: T = delaunayn (P, opt)

Form the Delaunay triangulation for a set of points. The Delaunay triangulation is a tessellation of the convex hull of the points such that no n-sphere defined by the n-triangles contains any other points from the set. The input matrix P of size [n, dim] contains n points in a space of dimension dim. The return matrix T has the size [m, dim+1]. It contains for each row a set of indices to the points, which describes a simplex of dimension dim. For example, a 2d simplex is a triangle and 3d simplex is a tetrahedron.

Extra options for the underlying Qhull command can be specified by the second argument. This argument is a cell array of strings. The default options depend on the dimension of the input:

  • 2D and 3D: opt = {"Qt", "Qbb", "Qc"}
  • 4D and higher: opt = {"Qt", "Qbb", "Qc", "Qz"}

If opt is [], then the default arguments are used. If opt is {""}, then none of the default arguments are used by Qhull. See the Qhull documentation for the available options.

All options can also be specified as single string, for example "Qt Qbb Qc Qz".