📐 Voronoi Diagrams and Lloyd's Relaxation
Interactive 3D point set where dragging seed points reshapes Voronoi cells, and running Lloyd's relaxation iterations smooths the cells into a centroidal, evenly-spaced pattern.
A field of draggable seed points tessellates a 3D slab into colored Voronoi cells; running Lloyd's relaxation repeatedly moves each seed to its own cell's centroid, smoothing the pattern into an even, honeycomb-like tessellation.
🔬 What It Demonstrates
A Voronoi cell is the set of points closer to one seed than to any other; its boundary is where two seeds are equidistant. Lloyd's algorithm iteratively relocates each seed to its cell's centroid, converging toward a centroidal Voronoi tessellation.
🎮 How to Use
Set the seed count, then drag any glowing pillar to reshape the diagram by hand. Press "Relax 1 step" or "Auto-relax" to watch the cells even out, and toggle centroid markers and cell edges to inspect the geometry.
💡 Did You Know?
Lloyd's relaxation, invented in 1957 for signal quantization, is the same core idea behind k-means clustering, finite-element mesh generation, and evenly-spaced stippling patterns in generative art.
Interactive 3D point set where running Lloyd's relaxation iterations shows how Voronoi cells smooth into evenly spaced, centroid-aligned regions.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install