as3delaunay is a library to calculate Delaunay triangulation and Voronoi diagrams. Using this library, a developer can easily create, for instance, a Voronoi diagram based on a set of points. In addition to the Voronoi diagram and the Delaunay triangulation, the library also provides the convex hull, minimum and maximum spanning trees, and several other related geometric entities.

The library is based on Steven Fortune’s C implementation of his sweepline algorithm.


var voronoi:Voronoi;
var p0:Point, p1:Point, p2:Point;
var points:Vector;
var plotBounds:Rectangle;

points = new Vector([p0,p1,p2]);
plotBounds = new Rectangle(-20, -20, 40, 40);
voronoi = new Voronoi(points, null, plotBounds);
Misc . URL.