Delaunator
Fast JavaScript library for Delaunay triangulation of 2D points
Delaunator is a fast library for Delaunay triangulation. It takes as input a set of points. The triangulation is represented as compact arrays of integers. It’s less convenient than other representations but is the reason the library is fast. After constructing a delaunay = Delaunator.from(points) object, it will have a triangles array and a halfedges array, both indexed by half-edge id. What’s a half-edge? A triangle edge may be shared with another triangle. Instead of thinking about each edge...