ofxDelaunay

Following the discussions on triangulating concave polygons, I decided to build a nice OF wrapper for Gilles-Dumoulin’s C++ implementation of Paul-Bourke’s Delaunay Triangulation algorithm.

So, here it is, nice and simple triangulation… example included. Seems to run pretty quickly, tested it triangulating up to 1000 points at 58fps, 500 points at 60fps (with ofSetFrameRate(60)).

Cheers!
-plong0

ofxDelaunay.zip

hi plong0, thx for posting this code.
been keen to play around with delaunay triangulation for a while now.
this code will be a nice leg up.

thx.

insane code,
thanks man,
was about to port some delaunay based code to OF
nice one

Hehe, I didn’t write most of the code… I just put a nice OF add-on wrapper on it to simplify its use.

As I’ve mentioned and documented in the source files, the original code is from Gilles Dumoulin’s C++ implementation of Paul Bourke’s Delaunay Triangulation algorithm. :slight_smile:

Glad you’re finding it useful though! Enjoy!

Hi there,
I am trying to implement ofxDelaunay at my of_preRelease_v0061_osx_FAT on Mac OSX 10.5 but i am taking the following errors:

Any help?
Thanks for sharing,
Aris

This is great plong0!

Wondering if you can help me, I’m trying to add a point (XYZ) that I can manipulate from the main program root (testApp) via mouse movement. Any tips?

Something like this:

int ofxDelaunay::addPoint(XYZ* pt){

p[nv] = pt;
nv++;
return nv;
}