MATLAB Functions Help Desk

delaunay

Purpose

Delaunay triangulation

Syntax

Definition

Given a set of data points, the Delaunay triangulation is a set of lines connecting each point to its natural neighbors. The Delaunay triangulation is related to the Voronoi diagram-- the circle circumscribed about a Delaunay triangle has its center at the vertex of a Voronoi polygon.

Description

TRI = delaunay(x,y) returns a set of triangles such that no data points are contained in any triangle's circumscribed circle. Each row of the m-by-3 matrix TRI defines one such triangle and contains indices into the vectors x and y.

TRI = delaunay(x,y,'sorted') assumes that the points x and y are sorted first by y and then by x and that duplicate points have already been eliminated.

Remarks

The Delaunay triangulation is used with: griddata (to interpolate scattered data), convhull, voronoi (to compute the voronoi diagram), and is useful by itself to create a triangular grid for scattered data points.

The functions dsearch and tsearch search the triangulation to find nearest neighbor points or enclosing triangles, respectively.

Examples

This code plots the Delaunay triangulation for 10 randomly generated points.

Compare the Voronoi diagram of the same points:

See Also

convhull    Convex hull

dsearch     Search for nearest point

griddata    Data gridding

tsearch     Search for enclosing Delaunay triangle

voronoi     Voronoi diagram



[ Previous | Help Desk | Next ]