← Back to the archiveSHORT / 034
One Line Visits 4,096 Rooms
Fractals & patterns

One Line Visits 4,096 Rooms

BEHIND THE WORK

Can one continuous line visit 4,096 positions without crossing itself?

This is a sixth-order Hilbert curve. Each level rotates and joins four smaller copies of the previous path. After six levels, one line visits every cell in a 64 × 64 grid while consecutive positions remain neighbors. The complete coordinate algorithm appears in the video.

Artismathic turns equations into visual art—one function at a time.

Music: 'Keep Climbing' by The Soundings

#MathArt #HilbertCurve #Fractal

THE MATHEMATICAL RULE

H1=[(0,0),(0,1),(1,1),(1,0)]H₁ = [(0,0), (0,1), (1,1), (1,0)]Fors=1,2,4,8,16,32:For s = 1, 2, 4, 8, 16, 32:rx=1ANDfloor(d/2)rₓ = 1 AND floor(d/2)rγ=1AND(dXORrx)rᵧ = 1 AND (d XOR rₓ)(x,y)←rotates(x,y,rx,rγ)+s(rx,rγ)(x,y) ← rotateₛ(x,y,rₓ,rᵧ) + s(rₓ,rᵧ)0≤d<46=4,0960 ≤ d < 4⁶ = 4,096
Watch the drawing↗

WATCH IT COME TO LIFE

Watch the drawing

YouTube loads only after you press play.