Comments (4)
We don't want to export all because it would be a mess to document, but we can think of a lighter call that returns the triangulation only. Maybe call it geoTriangulation, and it returns {delaunay, triangles, edges, find, neighbors }? It would also bring more performance to the geoContours I believe?
If you want to build a pull-request, please make it against #35 (I plan to merge it in main very soon).
from d3-geo-voronoi.
Feel like geoTriangulation would solve my problem specifically, not verry flexible if people want other parts extracted.
How about an optional parameter to existing geoDelaunay and geoVoronoi with a map string:bool which parameters to be computed ?
Or what would be the issue in exporting functions and documenting then in a bunch as Base functionality functions, for advanced use if needed.
?
from d3-geo-voronoi.
The issue is maintenance. If you want to take the code and do what you want with it, no problem, but if we offer an API it must (ideally!) be documented, tested and maintained.
It would be nice to see which of the functions really consume CPU. I would understand that computing all the circumcenters or the polygons is expensive, so it makes sense to stop before that.
Another approach maybe would be to rewrite all the methods as lazy functions that start computations only when needed. But I'm afraid it would introduce yet another API. This module already has 2, which is 1 too many :)
from d3-geo-voronoi.
Understandable about the maintenance issue, but the functions already exist and are part of main objects, so should already be tested and maintained indirectly.
And regarding documentation, they sort of are already, but it's not the function being documented, but it's return.
Maybe issue with 2 modules is that this lib should have as "convenience" functions just geoVoronoi and geoContour.
geoDelaunay be provided as the base functions of the library .
This way, people that rely on existing geoDelaunay can just implement it with 14-26 lines of code, using the base functions, if it becomes "deprecated".
As a tangent, for lots of points geoVoronoi is slow considering the preparation of the arrays beforehand, geoDelaunay is faster as it uses more direct array, could be faster with #7 (could be used with THREE.js *BufferAttribute ), but that is another discussion.
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
- 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.