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 A↔︎B, we will use two half-edges A→B and B→A. Having two half-edges is the key to everything this library provides. It will also be useful to have some helper functions to go from one half-edge to the next and previous half-edges in the same triangle. We can draw all the triangle edges without constructing the triangles themselves.

Features

  • Half-edges e are the indices into both of delaunator’s outputs
  • Triangle ids and half-edge ids are related
  • A Voronoi diagram is built by connecting the Delaunay triangle circumcenters together using the dual of the Delaunay graph
  • Construct and build polygons
  • Construct Voronoi cells
  • Convex hull

Project Samples

Project Activity

See All Activity >

Categories

Algorithms, Diagram

License

ISC License

Follow Delaunator

Delaunator Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Delaunator!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Algorithms, JavaScript Diagram Software

Registered

2022-02-24