2D Hilbert Curve

Rainbow gradient
Show as you go

Live stats

Order5
Grid32 x 32
Total segments1023
Curve length1023
Drawn0 / 1023
Built with the classic bit-based d2xy construction: each distance d along the curve is decoded to a grid cell by peeling off 2 bits at a time and rotating/reflecting the quadrant, the same recursive method used by the original 3D version but restricted to the plane, where the Hilbert curve naturally lives.