mesh dance tiny
in
Programming Questions
•
2 years ago
Hi guys, there's one tiny
sketch I came across on openprocessing.org recently.
It runs quite smooth from openprocessing site, but not if I copy code to p5.
It was written for tiny sketch competition, so bitcraft(author) used some funky shortcut techniques here.
Could please someone explain what is going along these lines?
I'm guessing there are several bit-to-bit operations... but the "for" loop is just frightening me ))
-
int b,i,t,d,a,n,c,e;void draw(){n=key&63;for(background(i=0);i++<n*n;stroke(-1,e+=n-dist(a=f(),b=f(),c=f(),d=f())-e))if(e>0)line(a,b,c,d);}int f(){return int(500*noise(t++%4>1?i/n:i%n,t%2*n+t/1E6));}
1