064

03-05

March 5 – 064.

ContextFree.org. Hilbert curve # 5

Sometime programs take you places you would never expect to go! Sol LeWitt or Ellsworth Kelly, I am sure, would have been intrigued by the potential of this little script. I am posting the grammar if some are adventurous enough to dive into the exploration of minimal art within the structure of a Hilbert curve:

shape Hilbert (natural i)

{ if (i) transform [s .9]

{ H=if(Var==3,3,1) // Var 2 has change of hue

F=H0.15^(Dept-i)50 // F depends on Dept.

Hilbert (i–5)[x +0.5 -0.5 f 115 h (-1*F)]

Connect(1,i–1)[x +0.5 0   r 90 h (-2*F)]

Hilbert (i–1)[x +0.5 +0.5       h (-1*F)]

Connect(2,i–1)[x 0   +0.5 f 90 h ( 0*F)]

Hilbert (i–1)[x -0.5 +0.5       h ( 1*F)]

Connect(3,i–1)[x -0.5 0   r -90 h ( 2*F)]

Hilbert (i–3)[x -0.5 -0.5 f 45 h ( 3*F)]

} }

Advertisements