# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# delaunay

Delaunay triangulation

### Note

Qhull-specific options are no longer supported. Remove the `OPTIONS` argument from all instances in your code that pass it to `delaunay`.

## Syntax

```TRI = delaunay(X,Y) TRI = delaunay(X,Y,Z) TRI = delaunay(X) ```

## Description

`TRI = delaunay(X,Y)` creates a 2-D Delaunay triangulation of the points (`X`,`Y`), where `X` and `Y` are column-vectors. `TRI` is a matrix representing the set of triangles that make up the triangulation. The matrix is of size `mtri`-by-3, where `mtri` is the number of triangles. Each row of `TRI` specifies a triangle defined by indices with respect to the points.

`TRI = delaunay(X,Y,Z)` creates a 3-D Delaunay triangulation of the points (`X`,`Y`,`Z`), where `X`, `Y`, and `Z` are column-vectors. `TRI` is a matrix representing the set of tetrahedra that make up the triangulation. The matrix is of size `mtri`-by-4, where `mtri` is the number of tetrahedra. Each row of `TRI` specifies a tetrahedron defined by indices with respect to the points.

`TRI = delaunay(X)` creates a 2-D or 3-D Delaunay triangulation from the point coordinates `X`. This variant supports the definition of points in matrix format. `X` is of size `mpts`-by-`ndim`, where `mpts` is the number of points and `ndim` is the dimension of the space where the points reside, 2 ≦ `ndim` ≦ 3. The output triangulation is equivalent to that of the dedicated functions supporting the 2-input or 3-input calling syntax.

`delaunay` produces an isolated triangulation, useful for applications like plotting surfaces via the `trisurf` function. If you wish to query the triangulation; for example, to perform nearest neighbor, point location, or topology queries, use `delaunayTriangulation` instead.

## Visualization

Use one of these functions to plot the output of `delaunay`:

 `triplot` Displays the triangles defined in the `m`-by-3 matrix `TRI`. `trisurf` Displays each triangle defined in the m-by-3 matrix TRI as a surface in 3-D space. To see a 2-D surface, you can supply a vector of some constant value for the third dimension. For example`trisurf(TRI,x,y,zeros(size(x)))` `trimesh` Displays each triangle defined in the m-by-3 matrix TRI as a mesh in 3-D space. To see a 2-D surface, you can supply a vector of some constant value for the third dimension. For example,`trimesh(TRI,x,y,zeros(size(x)))`produces almost the same result as `triplot`, except in 3-D space. `tetramesh` Plots a triangulation composed of tetrahedra.

## Examples

collapse all

Plot the Delaunay triangulation of a large dataset.

```load seamount tri = delaunay(x,y); trisurf(tri,x,y,z);```

## More About

collapse all

### Delaunay Triangulation

`delaunay` creates a Delaunay triangulation of a set of points in 2-D or 3-D space. A 2-D Delaunay triangulation ensures that the circumcircle associated with each triangle contains no other point in its interior. This definition extends naturally to higher dimensions.

## See Also

#### Introduced before R2006a

Was this topic helpful?

#### Beyond Excel: The Manager's Guide to Solving the Big Data Conundrum

Download white paper