Code: Select all
levels = 5
w,h = #.scrsize()
flake(w/2,h/2,#.min(w,h)/4,0)
flake(x,y,r,n)=
> i, 1..12,2
a = #.pi/6*i
x1 = x+r*#.cos(a)
y1 = y-r*#.sin(a)
#.drawline(x,y,x1,y1)
? n<.levels, flake(x1,y1,r/3,n+1)
<
.
Code: Select all
levels = 5
w,h = #.scrsize()
flake(w/2,h/2,#.min(w,h)/4,0)
flake(x,y,r,n)=
> i, 1..12,2
a = #.pi/6*i
x1 = x+r*#.cos(a)
y1 = y-r*#.sin(a)
#.drawline(x,y,x1,y1)
? n<.levels, flake(x1,y1,r/3,n+1)
<
.