// Justin Gonzalez //Midterm Oct. 31, 2014 float sunx=0, suny=50; float moonx=0, moony=50; float bx=width, by=10; float bw=30; float bh=30; float witchx=0, witchy=30; void setup() { size(600, 500); } void draw() { background(0, 205, 235); //color of the sky noStroke(); float horizon=height*1/4; fill(0, 0, 255); //color of the ocean during day // fill(0,0,100); // color of ocean during night rect(0, horizon, width, height); //the ocean wave(); bird(); sun(); } void wave() { float x=0; float horizon=height*1/4; float circlex=30; float circley=30; for (x=0; xwidth+200) { //going to moon to make it night moon(); } } void bird() { // bird fill(255, 100, 210); stroke(0); triangle( bx, by, bx+bw, by+bh/3, bx+bw, by-bh/3); bx=bx-2; //move bird if (bx<0-200) { // restarting the bird by=random(25, 50); bx=width; } } void moon() { background(0, 0, 195); //color of the sky fill(100, 100, 100); // color of the moon ellipse(moonx, moony, 50, 50); //moon moonx= moonx+4; //moving the moon //noStroke(); noStroke(); float horizon=height*1/4; //fill(0, 0, 255); //color of the ocean during day fill(0,0,100); // color of ocean during night rect(0, horizon, width, height); //the ocean wave(); bird(); float x=0; //float horizon=height*1/4; float circlex=30; float circley=30; for (x=0; x