We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › voronoi math bug
Page Index Toggle Pages: 1
voronoi math bug (Read 391 times)
voronoi math bug
Dec 26th, 2007, 6:58am
 
I made an oh-so-trendy voronoi tessellation (which proved a little harder than I thought) but I have a small bug that gets worst when the number of points increases.

Here is the applet, with the zipped source. You can drag the points around and press a key to see the circles. I used a random seed so the points are always generated in the same configuration, for easy reference.
http://solidox.evonet.ro/z/applet/

You can see there are a couple of lines (points) that just don't respond to other points in in their vicinity. They just shoot a line across all the others.

I tracked the bug to some problem with circles being HUGE but I can't kill it.
What's even weirder is that I never draw lines, I just draw complete triangles, and that's a line (or a line made of 3 collinear points).

I removed most of the voronoi stuff in an attempt to clean it up a bit, so now it's just delaunay triangulation.


Any ideas ?
Page Index Toggle Pages: 1