MATLAB Function Reference Previous page   Next Page

N-dimensional Delaunay tessellation



T = delaunayn(X) computes a set of simplices such that no data points of X are contained in any circumspheres of the simplices. The set of simplices forms the Delaunay tessellation. X is an m-by-n array representing m points in n-dimensional space. T is a numt-by-(n+1) array where each row contains the indices into X of the vertices of the corresponding simplex.

delaunayn uses Qhull.

T = delaunayn(X, options) specifies a cell array of strings options to be used as options in Qhull. The default options are:

If options is [], the default options used. If options is {''}, no options are used, not even the default. For more information on Qhull and its options, see


Plotting the output of delaunayn depends of the value of n:


Example 1. This example generates an n-dimensional Delaunay tessellation, where n = 3.

You can use tetramesh to visualize the tetrahedrons that form the corresponding simplex. camorbit rotates the camera position to provide a meaningful view of the figure.

Example 2. The following example illustrates the options input for delaunayn.

The command

returns the following error message.

??? qhull input error: can not scale last coordinate. Input is cocircular or cospherical. Use option 'Qz' to add a point at infinity.

This suggests that you add 'Qz' to the default options.

To visualize this answer you can use the tetramesh function:


delaunayn is based on Qhull [2]. For information about Qhull, see For copyright information, see

See Also

convhulln, delaunayn, delaunay3, tetramesh, voronoin


[1]  Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The Quickhull Algorithm for Convex Hulls," ACM Transactions on Mathematical Software, Vol. 22, No. 4, Dec. 1996, p. 469-483. Available in HTML format at pubs/citations/journals/toms/1996-22-4/p469-barber/ and in PostScript format at

[2]  National Science and Technology Research Center for Computation and Visualization of Geometric Structures (The Geometry Center), University of Minnesota. 1993.

Previous page  delaunay3 delete Next page

© 1994-2005 The MathWorks, Inc.