Random Squares by Bill Kolomyjec
Initially starting with this project I picked a different image, but struggled with it, so I switched to this, simpler one. That was
And I like the effect somewhat, but I realized that each unit was not actually independent. I therefore switched to a very similar graphic where each unit was entirely independent.
int s= 100; //int p=s/5; void setup(){ //size(500,500); fullScreen(); for(int x=0; x<width; x+=s){ for(int y=0; y<height; y+=s){ drawSquares(x,y); } } } void drawSquares(int x, int y){ int xc=int(random(s/5,3*s/5)); int yc=int(random(s/5,3*s/5)); int num=int(random(1,11)); int xs=xc/num; int ys=yc/num; int p= s/num; noFill(); stroke(0); rect(x,y,s,s); for(int i=1; i<num; i++){ //rect(x+i*xc/num,y+i*yc/num,x+i*(x+xc)/num,y+i*(y+yc)/num);//I like it rect(x+xs*i,y+ys*i,(p*(num-i)+s/5)*4/5,(p*(num-i)+s/5)*4/5); } rect(x+xs*(num),y+ys*(num),s/5*4/5,s/5*4/5); }
I am not sure that all of the offsets (like the factor of 4/5) are quite right, but the effect is satisfactory.