<< convex_hull_3 CG-lab delaunay_3 >>

CG-lab >> CG-lab > delaunay_2

delaunay_2

Delaunay triangulation of a set of points in 2d space.

Calling Sequence

[tri [,ptr] ] = delaunay_2(x,y)

Parameters

x , y
: are vectors of points coordinates.
tri
: is (nbtriangle,3) array, Each row of tri defines one triangle and contains indices into (x,y).
ptr
: is a pointer representing the Delaunay triangulation, dt2. The associated functions of Delaunay triangulation that using "ptr" are: - dt2_insert_points - dt2_remove_points - dt2_get_connectivity - dt2_delete

Description

A Delaunay triangulation of a set of points is a triangulation of the sets of points that fulfills the following empty circle property (also called Delaunay property): the circumscribing circle of any facet of the triangulation contains no point of the set in its interior. For a point set with no case of cocircularity of more than three points, the Delaunay triangulation is unique, it is the dual of the Voronoi diagram of the points.

Examples

x =rand(1,100);
y =rand(1,100);
tri = delaunay_2(x,y);
[nbtri,nb] = size(tri);
tri = [tri tri(:,1)];
for k = 1:nbtri
plot2d(x(tri(k,:)),y(tri(k,:)),style = 2);
end

See Also

for more details see CGAL Manual.

This function uses the Triangulation_2 package of CGAL, which is under QPL license. See License Terms

Authors

<< convex_hull_3 CG-lab delaunay_3 >>