Skip to main content
100%

Voronoi Topology

✓ Published0🌍 Public
Mmbostock
Last edited Jun 15, 2016
Created on Apr 2, 2014

One hundred particles drift and bounce across a canvas, their movements guided by random acceleration and velocity decay. A Voronoi diagram of their positions is computed, then converted into a TopoJSON topology using d3-voronoi and custom logic, allowing adjacent cells to be merged or meshed via topojson.merge and topojson.mesh. The canvas animation renders the resulting cell boundaries in gray and highlights alternating merged cells as semi-transparent red polygons, with particle positions drawn as red or black dots.

AI-generated description

This example demonstrates computing a TopoJSON topology from a Voronoi diagram of random points using d3-voronoi. By computing the topology, cells can be coalesced using topojson.merge and topojson.mesh.

gpl-3.0 Licensed

Similar vizzes