//this is a ducky watching the sky, by Sara Mattice, sept 20 float y = 0.0; float x = 0.0; float z = 0.0; float fd = 1; float q = random(0,11); //below: image setup, above, variables in float form void setup(){ size(600,400); smooth(); fill(0); } //this starts the drawing void draw() //background color chooser { if(q <=5){ background(0); } else { background(129,206,255); } noStroke(); //celestial body and color chooser if(q<=5){ fill(255); } else { fill(255,255,0); } ellipse(y+449,y,70,70); y+=.25; while (y >= 420) { y = 10.0; } //reflection ellipse(460+z,470-z,30+(z/2),40+z); z+=.25; while (z >= 420) { z = 10.0; } //fishy, next two shapes fill(0,0,255); if ((x+470 > width-10)|| (400-x > height+2)) fd *= -1; ellipse(x+470,400-x,20,10); //290,311 is the fish's butt if (fd > 0){ triangle(x+460,401-x,x+456,393-x,x+456,408-x); } else { triangle(x+480,401-x,x+484,393-x,x+484,408-x);} x+=.25*fd; while(x>200){ x=10.0; } //water fill(0,100,100,150); triangle(0,400,600,200,600,400); //ground fill(102,214,89); triangle(0,400,600,200,0,250); //line between water and ground stroke(150); line(0,400,600,200); //feet stroke(255,203,13); strokeWeight(15); line(108,225,108,250); line(78,225,78,250); noStroke(); //head fill(255,255,0); ellipse(100,95,90,90); //body fill(255,255,0); ellipse(90,175,120,100); //bill fill(255,203,13); ellipse(115,115,38,18); //wing stroke(0); noFill(); strokeWeight(1); bezier(140,154,140,160,145,165,150,170); //leftwing bezier(67,157,55,175,50,195,31,180); //right side fill(0); ellipse(130,94,15,15); fill(255); ellipse(134,90,5,5); //left shape fill(0); ellipse(96,100,15,15); fill(255); ellipse(100,96,5,5); }