Comments (10)
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.)
from d3-geo-voronoi.
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
from d3-geo-voronoi.
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. 👍
from d3-geo-voronoi.
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!
https://beta.observablehq.com/@mbostock/spherical-voronoi
from d3-geo-voronoi.
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.
https://beta.observablehq.com/@fil/spherical-voronoi
I'm still working on the n=3 case to build the correct polygons (LineStrings connecting antipodal points… that doesn't work well).
from d3-geo-voronoi.
I think I just borked something in my simplification of your code. I switched to importing your notebook directly (using with {points}
to replace the input) and it works great!
from d3-geo-voronoi.
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.
from d3-geo-voronoi.
I think I've solved the outstanding issues (edge cases with n=1, 2 and 3)
https://beta.observablehq.com/d/85fbdef16ebd12aa
Now, to add sugar…
from d3-geo-voronoi.
In terms of capacity, it looks like the maximum on my computer is n = 125578 points. The polygons are still computed in a few seconds.
I don't know why it breaks with n = 125579, observable catches the error and the console does not report. Not d3-delaunay's fault, it can go much higher than that (10 million points and more).
Edit: "RangeError: Maximum call stack size exceeded."
Edit: fixed!
from d3-geo-voronoi.
I just published release 1.0.0 based on d3-delaunay (wooohooo)
from d3-geo-voronoi.
Related Issues (20)
- Numeric stability HOT 8
- Geo Voronoi polygons out of triangles HOT 4
- Move to Delaunator@3 HOT 2
- return a clean triangulation HOT 4
- geoHeatmap
- long edges?
- No geoContour in v1.6.0 release. HOT 2
- Would pull requests with typescript *.d.ts definition files be welcome HOT 1
- Overlapping Voronoi polygons HOT 6
- geo_hull() Use more semantically meaningful Set and Map. HOT 2
- geo_edges: Use the more semantically meaningful Set HOT 3
- Benchmarks: A uniform approach HOT 1
- Extend and correct benchmarking HOT 2
- Add code coverage
- Export base functions to compute elements as they are needed HOT 4
- Error in hull HOT 3
- Inconsistent broken projection of a 4 - segment beach ball HOT 3
- Voronoi where each site is a segment instead of a point.
- Bounding box support for geoVoronoi HOT 4
- Unexpected Singularities in Projection HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-geo-voronoi.