Delaunay triangulation.

Given a set of points, the plane can be split in domains for which the first point is closest, the second point is closest, etc. Such a partition is called a Voronoi diagram.

If one draws a line between any two points whose Voronoi domains touch, a set of triangles is obtained, known as the Delaunay triangulation. Generally, this triangulation is unique. One of its properties is that the outcircle of every triangle does not contain any other data point.

It is used, for instance, when one wishes to construct an approximation to a function z(x,y) whose values are only known for a finite set of points (x,y) (e.g. these could be depth measurements in a canal and the approximation z(x,y) would be used to determine how much sediment has accumulated since an earlier measurement).

The Java applet on this page is intended for instructive use only; you can define points and view the Delaunay (in blue) and Voronoi (in green) data, along with the outcircles (in gray); you can also move an existing point around and see, in real time, how this affects the triangles and the domains. Click on the Help button for a brief overview of the functionality.

The triangulation algorithm used here is very simple (it's adapted from the O(n^4) algorithm in J. O'Rourke's book, "Computational Geometry in C", Cambridge University Press, 1994, ISBN 0521445922). It is sufficiently fast for demo purposes, but only up to 20 or so points. If you want to triangulate 100,000 points look at the Voronoi entries in netlib, e.g. http://www.mirror.ac.uk/sites/netlib.bell-labs.com/netlib/voronoi/index.html.

The source code:


Denis Constales - dcons@world.std. com - http://cage.UGent.be/~dc/index-world.html