This repository implements Steven Fortune’s algorithm (sweep-line method) for generating Voronoi diagrams in JavaScript, providing a performant browser-side solution for computational geometry of planar point sets. With this library you can feed a set of sites (points) and compute their Voronoi cells – the partition of the plane into regions closest to each site – in O(n log n) time. It’s especially useful in web UIs, visualizations, interactive maps, and generative-art contexts where you need dynamic tessellations or diagrammatic layouts. The library exposes API functions for computing cells, retrieving neighbors, and drawing results into canvas or SVG. Because it is pure JavaScript and self-contained, it integrates easily with browser or Node.js applications without heavy dependencies. For developers exploring spatial algorithms, generative UI, or interactive diagrams, this codebase is a practical reference and tool to build upon.

Features

  • Implementation of Fortune’s algorithm for Voronoi diagram generation in JavaScript
  • API to compute cells from given sites and retrieve adjacency/neighbor information
  • Rendering support for canvas or SVG to visualize output
  • Lightweight, dependency-free code able to run in browser or Node.js contexts
  • Useful for spatial layout, generative art, GIS, or interactive diagrams
  • Open code to inspect, extend or integrate into custom visualization pipelines

Project Samples

Project Activity

See All Activity >

Categories

Algorithms

License

MIT License

Follow Javascript-Voronoi

Javascript-Voronoi Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Javascript-Voronoi!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Algorithms

Registered

14 hours ago