If at first your code conversion doesn't succeed:
Throw it out and find some better code! :)
I found some MUCH shorter code by John Burkardt, which for some reason still
seemed a bit wonky in terms of array indices (my favorite thing to debug), but I
got to work fairly quickly.
It spits out duplicate triangles, so it took me a bit to write a post-process to
weed those out and just get a list of the minimum number of triangles. That
part is still misbehaving - but the Delaunay triangulation works, at least.
Now I've got the dual of the Voronoi. :)
Enjoy.
Post a reply to this message
Attachments:
Download 'delaunaytriangulatetest2.png' (58 KB)
Preview of image 'delaunaytriangulatetest2.png'
|