gorhill / Javascript-Voronoi

A Javascript implementation of Fortune's algorithm to compute Voronoi cells
http://www.raymondhill.net/voronoi/
Other
1.01k stars 166 forks source link

Voronoi tessellation fails with nearly collinear input. #12

Open mbostock opened 10 years ago

mbostock commented 10 years ago

The following input results in a blank canvas:

100,100
200,200.0001
300,300

screen shot 2013-09-19 at 7 14 57 pm

However, note that three exactly collinear points produce the expected result:

100,100
200,200
300,300

screen shot 2013-09-19 at 7 15 06 pm

gorhill commented 10 years ago

I verified that when using the core library rhill-voronoi-core.js (or its minified version rhill-voronoi-core.min.js) this particular problem doesn't occur.

The main demo page doesn't use an up to date version of the core library, it is an much older and custom version (not even on github) because of the requirement of smoothly animating the sweep line with hooks in the main loop etc. (hence the notice "this page uses an out of date version").

It still need to be fixed, but I see it as low priority.

mbostock commented 10 years ago

Nice to know. Thanks for verifying!