Skip to content

jasonwebb/2d-voronoi-experiments

Repository files navigation

Series of visual experiments exploring Voronoi diagrams using JavaScript

Inspiration

Packages used

  • d3-delaunay for fast, robust Voronoi diagram generation.
  • p5.js for canvas drawing and miscellaneous helper functions (like lerp and map).
  • Webpack for modern JS (ES6) syntax, code modularization, bundling, and serving locally.
  • dat.GUI for a parametric UI

Key commands

Key Action
r Reset sketch
i Invert colors
p Toggle visibility of points
b Toggle blur effect

Install notes

  1. Run npm install
  2. Run npm run serve

Screenshots

Basic Voronoi

Rings

Rings in motion

Orbits

Playground

Reducing radii

Phyllotaxis