//Justin float horizon=600; float x=0,y=300; float w=30; float h=30; int n=3; //# of pairs void setup(){ size(800,800); } void draw(){ background(0,0,255); fill(0,255,0); rect(0,horizon,width,height*3/4); flock(n,x,y,w,h); x+=10; if (x>width+200){ y=random(100,500); x=0; } } void bird(float x, float y, float w, float h){ // bird fill(255,100,210); stroke(0); triangle( x,y, x-w,y-h/3,x-w,y+h/3); x=x+2; //move bird x=x+2; if (x>width+200){ y=random(100,500); x=0; n= int (random (3,10) ); } } void flock(int n, float x,float y, float w, float h){ float xx=x; float ww=w; float hh=h*1.25; //Lead Bird bird(xx,y,w,h); xx=xx - 1.25 *w ; //Pairs of Followers for (int j=1; j