Mondrian
poke(0x5f2d,1)p={x=0,y=0}pal({8,10,-4,7,7,7},1)function s(x,y,w)srand((x-m)/(y-n))rectfill(x,y,x+w,y+w,rnd(7))rect(x,y,x+w,y+w,0)if(p.x>=x and p.x<x+w and p.y>=y and p.y<y+w)w/=2s(x,y,w)s(x+w,y,w)s(x,y+w,w)s(x+w,y+w,w)end::a::cls()p.x=stat(32)p.y=stat(33)m=-(t()*8%256)n=m/2s(m,n,512)flip()goto a |
Combines the style of Piet Mondrian with this recursive squares thing-I-don't-know-the-name-for-but-I've-definitely-seen-before, all in 296 characters. It's also a one-liner, although I wasn't trying to make it one originally. One line just happened to save the most characters in this case.
Requires mouse controls.
[Please log in to post a comment]




