-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't render Voronoi diagram for particular set of points #37
Comments
Ah, great! I had not thought to try another browser. I was using Firefox 59.0.2 on macOS. It throws no errors in the console. |
When I replace the render line to this: voronoi.render({moveTo: console.log, lineTo: console.log}); I see some weird huge values, which Firefox probably can't handle: 664.4831297076121 -31.1735912402529
672.3576712448785 -72.0304244992434
664.4831297076121 -31.1735912402529
680.819008033027 -16.631376838536138
633.5412543174806 393.00884225846926
23813793908081870 21199061956212450
121.41720113242671 -231.98418498812734
-26277289829606750 -23392068365475628
121.41720113242671 -231.98418498812734
154.39760765467472 -237.02142549637443
... @mbostock I suspect this is some unhandled edge case in the clipping code? |
The issue here is that because the points are (nearly) collinear, some of the circumcenters have huge coordinates. We’re not doing anything special to handle these huge coordinates in voronoi.render, but we probably should clip the line segments before rendering, as we do in voronoi.renderCell. |
Hello,
I'm having trouble rendering a Voronoi diagram for a set of points with a certain structure. The set of points looks like this:
Here is a notebook that describes the issue in more detail.
This sounds like it might be related to #20, though no error is thrown in this case.
The text was updated successfully, but these errors were encountered: