|
|
|
|
|
by moonchild
1883 days ago
|
|
And here it is in apl :) (width iterations) ← 127 64 ⍝ perfect size for a nice sierpinski
advance ← {2|-⌿¯1 1⊖⍤0 1⊢⍵} ⍝ on a torus
x←width⍴0 ⋄ x[⌊width÷2] ← 1
{⎕←' ⌹'[⍵]⋄advance ⍵}⍣iterations⊢x
And the random variant (not as pretty, but still has some nice triangles): {⎕←' ⌹'[⍵]⋄advance ⍵}⍣iterations ?width⍴2
|
|