Log In  


Midpoint displacement hills 🗻

Inspired by https://beta.openprocessing.org/@epi/2816011/

(297 chars)

pal({129,131,134,142,132,141,1},1)::_::cls(1)for i=0,19do h={[0]=0,[128]=0}s=64while s>0do for x=s,127,s*2do h[x]=(h[x-s]+h[x+s])/2+rnd(s/2)-s/4end s\=2end fillp(i%2*1285+i%4\2*23130)for x=0,127do line(x,40+i*5+cos((x-i)/128)*22+h[x],x,127,50+i\4*17)end flip()end repeat flip()until btnp()>0goto _
2



[Please log in to post a comment]