/*Paul Paddock CSCI-001 Reiser Animation*/ //City growth ultimately plunging into never-ending darkness //and infinitely coming closer float increment = 0.1; int fade; int x1;//bldg. x position int x2;//bldg. width int y1;//bldg. height void setup() { size(900,600);//meant to be a panoramic view background(250,250,0,0);//stage frameRate(7); smooth(); strokeWeight(5); fade=(int)random(0,130); } void draw() { stroke(30,80);//high rise outlines x1 = (int)(random(width)); x2 = (int)(random(70,140));//because those buildings take up so much space y1 = (int)(random(height)); fill(int(random(0,250)));//bldg. colors rect(x1,600,x2,-y1);//500=ground level fill(fade, fade);//background getting darker & less opaque rect(0,0,900,600);//meant to give illusion of buildings getting closer to you!! fade-=increment; if((fade<=0) && (fade>=255)) { increment*=-1; } }