-
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
Export base functions to compute elements as they are needed #36
Comments
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). |
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 ? |
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 :) |
Understandable about the maintenance issue, but the functions already exist and are part of main objects, so should already be tested and maintained indirectly. Maybe issue with 2 modules is that this lib should have as "convenience" functions just geoVoronoi and geoContour. 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. |
Hello, would it be possible to export "all" the functions in this library so we can create custom/liter geoDelaunay for example ?
My use-case is to use
geoDelaunay
to create the edges on a big set of points but i am not interested in anything afteredges = geo_edges(triangles, points),
.Looking at performance, ~50% of load is used of generating edges and the rest on neighbors,hulls,etc.
Something like this as a basic example is what I am thinking (with export to all the functions inside the .js files):
The text was updated successfully, but these errors were encountered: