Hilbert Curve
Generate, interact with, and export the continuous Hilbert space-filling fractal curve online. Supports custom recursion orders (1 to 7), canvas pan/zoom touch gestures, and clean SVG and PNG exports.
Interactive workspace loading...
How to Use Hilbert Curve
Key Features
Common Use Cases
- Spatial indexing and multi-dimensional database indexing (geohashing, R-trees).
- Computer graphics, image dithering, and locality-preserving color quantization.
- Algorithmic art, mathematical visualization, and educational demonstrations.
- CNC laser routing, pen plotters, and single-stroke continuous vector paths.
Frequently Asked Questions
The Hilbert curve is a continuous fractal space-filling curve first described by German mathematician David Hilbert in 1891. Its Hausdorff dimension is 2, completely filling the 2D unit square as the order approaches infinity.
An order $n$ Hilbert curve contains exactly $4^n$ vertices and $4^n - 1$ line segments. Order 1 has 4 points, Order 4 has 256 points, and Order 7 has 16,384 points.
Because vertex count grows quadruply ($4^n$), order 8 generates 65,536 points and order 9 would generate 262,144 points. Capping at 7 guarantees instantaneous rendering without freezing browser UI.