int tx, ty; //a function to set up the general drawing parameters void setup() { size(400,400); background(#000000); smooth(); tx = 400; ty = 100; frameRate(20); } //press any key to reset the fish void keyPressed() { tx = 400; ty = 100; } //function to draw the fish void drawSpoonguy() { //person code ellipse(50,200,50,50); line(45,375,45,320); line(55,370,55,320); line(55,370,65,370); line(45,375,55,375); ellipse(40,190,20,20); ellipse(65,190,20,20); ellipse(35,190,2,2); ellipse(70,190,2,2); arc(45,210,30,10,65,210); line(60,250,90,230); ellipse(50,275,40,100); line(60,260,90,250); //spoon ellipse(90,250,5,150); ellipse(90,150,50,70); } //the draw function - which will loop void draw() { int i; i = 0; background(#FFFFFF); pushMatrix(); translate( tx, ty); drawSpoonguy(); popMatrix(); //update my variables - either randomly update y or use sin tx = tx - 1; //ty = ty + int(random(-5, 5)); ty = 40 + int(30*sin(tx/400.0*6*PI)); }