Tags: convex hull, delaunay, Lee Byron, library, math, processing.org, voronoi
MeshLibDemo.pde - Demo of Lee Byron’s Mesh library
Lee Byron has written a neat little Processing library called Mesh which allows for easy calculation and display of Voronoi, Delaunay and Convex Hull diagrams.
Given a set of points, these diagrams calculate the minimal regions around the points (Voronoi), an optimal triangulation of the points (Delaunay) or the polygon shape that contains all the points (Convex Hull). So far the library only supports the 2D versions of the diagrams, but it is in part based on the QuickHull3D java library which also handles 3D hulls.
Byron didn’t include any code examples in the current release, so I hacked up a quick demo.
To run this example, download MeshLibDemo.zip and unzip it inside your Processing sketches folder. The Mesh library is included in a “libraries” subfolder, but you’ll have to restart Processing for the library to be recognized.
I’m posting the full code below for easy reference.




