-
Notifications
You must be signed in to change notification settings - Fork 24
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
Performance #1
Comments
See if we can apply the sweep-hull technique of https://github.com/mapbox/delaunator / https://github.com/d3/d3-delaunay to our 3D model. Or use D. Sinclair's newer algorithm https://arxiv.org/pdf/1602.04707.pdf |
Here's a notebook that seems to work, built on top of d3-delaunay. https://beta.observablehq.com/@fil/geo-delaunay Computations are several orders of magnitude faster than the current d3-geo-voronoi. (The notebook is not that fast, because rendering is slow.) |
Nice! I massaged your code a little bit to construct the spherical Voronoi of the Fibonacci lattice. It does seem to be a little brittle depending on the inputs—perhaps because I broke something in my attempts to “simplify” the code—but I’m excited to see your progress here! |
Do you mean when n is small? This should be fixed now — in the sense that the code shouldn't break anymore when n <= 3. I'm still working on the n=3 case to build the correct polygons (LineStrings connecting antipodal points… that doesn't work well). |
I think I just borked something in my simplification of your code. I switched to importing your notebook directly (using |
My code from yesterday was not working that well :-) There are quite a bit of difficult issues when n is small and the points are clumped together in one spot. |
I think I've solved the outstanding issues (edge cases with n=1, 2 and 3) Now, to add sugar… |
I added a mesh computation to my notebook, too. Edit: Ah, I see you’d already done this, too, and that I can simplify my code. 👍 |
Edit: fixed! |
I just published release 1.0.0 based on d3-delaunay (wooohooo) |
Loren Petrich's lib uses an algorithm that seems to be in
O(n^2)
. It is unpractical for n > 1000. (d3-voronoi runs inO(n) log(n)
.)See http://bl.ocks.org/Fil/704bdbac80ab2e5d741d5fa3662bdf82
Three possibilities:
The text was updated successfully, but these errors were encountered: