Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.34 KB

README.md

File metadata and controls

34 lines (25 loc) · 1.34 KB

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 Amnon Owed Kyle McDonald Rafael Redondo