Simple two-dimensional Voronoi diagrams
C++ C
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

ofxVoronoi

ofxAddons Thumbnail

This repo started as a fork of Vanderlins ofxVoronoi, but I ended up changing too much code and decided to make it an independent addon.

This addon allows the generation of simple two-dimensional voronoi diagrams inside openframeworks. It uses a modified version of Stephan Fortune's sweep line algorithm written by Chris H. Rycroft for the Voro++ project.

Basic Example

Now with added support for Lloyd's algorithm useful for relaxing the diagram for use with stippling effects.

Example:
Create as usual

ofxVoronoi relaxedVoronoi;
relaxedVoronoi.setBounds(bounds);
relaxedVoronoi.setPoints(points);
relaxedVoronoi.generate();

int relaxIterations = 3;
while(relaxIterations--){
    relaxedVoronoi.relax();
}

Contributors:
Todd Vanderlin
Matthias Esterl
Andreas Borg