/* Matt Martell IAT 800 - Dr. Christopher Shaw Due Sept. 12, 2008 A1-16 */ void setup() { size(500,230); smooth(); } int x; int y; int z; void draw() { background(999); //Cannon strokeWeight (7); line (20,220,50,200); fill (0,235,0); strokeWeight (3); ellipse(30,217,12,12); //Targets fill (0,112,112); strokeWeight(2); ellipse(350,60,40,40); ellipse(350,60,30,30); ellipse(350,60,20,20); ellipse(350,60,10,10); ellipse(400,140,40,40); ellipse(400,140,30,30); ellipse(400,140,20,20); ellipse(400,140,10,10); //The Shot if(mousePressed) { fill(250,250,10); triangle(50,200,65,185,70,203); //explosion frameRate(30); fill (255, 0, 0); ellipse (mouseX, mouseY, z, z); z = z + 2; if (z>=100) z=1; } }