Fork of #HAW: Svelte + D3: Voronoi
✓ Published1🌍 Public
This interactive Voronoi diagram visualizes the spatial partitioning of 100 randomly generated points, with a highlighted cell tracking the mouse position. The visualization updates the Voronoi tessellation in real time as the cursor moves, using `Delaunay.from()` and the resulting `voronoi()` method to compute cells. The Svelte app binds client dimensions to size the SVG, while `scaleLinear` maps data coordinates to screen space. Yellow fill and green stroke emphasize the active cell, while a larger green circle marks the cursor’s data point.
AI-generated descriptionMIT Licensed