Skip to main content
100%

Hilbert paths

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Jan 30, 2017
Created on Jan 30, 2017

A colorful, animated SVG visualization of Hilbert curves traces a path through a 512×512 grid, with the curve segmented into randomly sized, color-coded strokes. A white outline shows the full curve while seven white circles jump along it, updating their positions and a coordinate readout via `d3.interval`. The code uses `d3.scaleOrdinal` for color, `d3.range` for path generation, and custom `d2xy` and `xy2d` functions to map between Hilbert curve indices and 2D coordinates. Built with d3.v4 and SVG.

AI-generated description
mit Licensed

Similar vizzes