//New Project. Clyde of Pac-Man fame!!! //NOTE - K is used to scale the image //Pupils move with cursor and background color change with mouse move void setup(){ size(600, 700); smooth(); noStroke(); } int value = 0; void draw(){ float k=1.0; background(0, value, value+10); //head and body if (mousePressed == true) { fill (0, 0, 250); } else { fill(200, 102, 50); } ellipse(k*250, k*300, k*300, k*300); rect(k*100, k*300, k*300, k*200); triangle(k*150, k*550, k*100, k*500, k*200, k*500); triangle(k*250, k*550, k*200, k*500, k*300, k*500); triangle(k*350, k*550, k*300, k*500, k*400, k*500); //Eyes if (mousePressed == true) { fill (0, 0, 250); } else { fill(250); } ellipse(k*190, k*300, k*80, k*100); ellipse(k*300, k*300, k*80, k*100); //Pupils if (mousePressed == true) { fill (250); } else { fill(10, 120, 250); } ellipse(k*mouseX+110, k*mouseY, k*30, k*40); ellipse(k*mouseX, k*mouseY, k*30, k*40); //Mouth if (mousePressed == true) { fill (250); } else { fill(200, 102, 50); } rect(k*170, k*435, k*30, k*15); rect(k*230, k*435, k*30, k*15); rect(k*290, k*435, k*30, k*15); rect(k*155, k*450, k*15, k*15); rect(k*200, k*450, k*30, k*15); rect(k*260, k*450, k*30, k*15); rect(k*320, k*450, k*15, k*15); } void mouseMoved() { value = value + 5; if (value > 255) { value = 0; } }