简体   繁体   中英

Geometry library

Is there a geometry library for NodeJS that can efficiently handle operations such as union and intersection of paths with bezier curves, path simplification and Delaunay triangulation on a very large set of objects?

I've been looking into JSTS , a port of the Java library JTS, which has a Delaunay triangulation algorithm, but it seems that the current implementation of the union operation is broken.

d3 's implementation of the Delaunay triangulation is much faster but doesn't support union of complex polygons.

雷蒙德·希尔Raymond Hill)的Voronoi库(我是从node-canvas示例中找到的 )-您可以使用它来计算Delaunay三角剖分。

My C++ library geogram can be compiled (transpiled) to Javascript using Emscripten , a C++-to-Javacript compiler that works (surprisingly) very well.

See some transpiled examples of geogram (that run in a webbrowser) here

Delaunay 2D example is here (click to add points, press 'a' to animate, click to add many points)

Note: Interfacing with your own code may require a bit of work to export the Delaunay functions so that they can be called from other Javascript code, see Emscripten Embind module (but this can be done quite easily).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM