Fork me on GitHub

Javascript implementation of Steven J. Fortune's algorithm to compute Voronoi diagrams

Main page


See my blog post regarding this page. This page uses an out of date version (and customized to serve as a tutorial of Fortune's algorithm) of the Javascript Voronoi object. However the demo pages listed above use the latest version.

Sites generator

or sites randomly (Warning: performance might suffer the more sites you add.)


canvas W × H to pixels × pixels, with a margin of pixels.

Event queue

(down arrow works too)

every ms


Red beach sections are collapsing (meaning there is a Fortune circle event associated with them), while green beach sections are expanding. When all the Fortune events have been processed, a beachline most likely still exists, which means the start and/or end points of the edges implied by each pair of beach sections are not connected, in which case we must ‘manually’ connect these dangling lines to the bounding box, or discard them if they are outside the viewport.

Portions of this software are based on, or depend on, or are inspired from the work of...