float x, y, w, h; int randomBirds; void setup(){ size(820,600); reset(); } void reset(){ randomBirds= int ( random( 3,10 ) ); x= 0; y= random( 100,500 ); w= random( 10,70 ); h= w/4; } void draw(){ background( 150,150,250 ); fill( 50,30,150 ); flock( randomBirds, x,y, w,h ); x = x+20; } void flock( int randomBirds, float x, float y, float w, float h ){ float xx= x; float ww= w; float hh= h * 3; bird( xx,y,w,h ); xx= xx - 2*w; for (int p=1; p width 500 && x-w > width+500 ){ reset(); } } void keyPressed(){ if (key == 'r') reset(); if (key == 'q') exit(); }