/* ~INTERACTIVE DRAWING~ "MEOW MEOW MEOW" KAEL SARMENTO SEPT. 19, 2016 When user moves mouse/fish around, the cat's head follows. */ // SETUP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void setup() { size(400, 400); ellipseMode(CENTER); } // DRAW (LOOP) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void draw() { //set framerate? frameRate(60); //THE ROOM/BACKGROUND //set background to fill light pink background(232, 64, 35); //code the floor rectMode(CORNER); strokeWeight(2); stroke(102, 30, 22); fill(138, 40, 30); rect(0, 150, 400, 250); //shadow noStroke(); fill(71, 21, 16, 99); rect(170, 230, 165, 60, 90); rect(140, 220, 300, 45, 90); //THIS IS THE BODY OF THE KITTY CAT fill(255); rect(220, 95, 200, 145, 130); //center rect from now on rectMode(CENTER); //cat paws fill(200); rect(170, 235, 60, 35, 90); fill(255); rect(330, 240, 60, 35, 90); //wag that tail gurl stroke(255); strokeWeight(23); noFill(); curve(sin(frameCount * 0.07) * 70, 45, 350, 20, 320, 110, sin(frameCount * 0.07) * 200, 120); noStroke(); //cat spots fill(212, 132, 51); rect(320, 140, 130, 90, 90); fill(99, 54, 34); rect(350, 175, 50, 70, 90); //kitty ears fill(255); triangle(165 + (mouseX * 0.03), 105 + (mouseY * 0.04), 220 + (mouseX * 0.03), 140 + (mouseY * 0.04), 160 + (mouseX * 0.03), 190 + (mouseY *0.04)); triangle(325 + (mouseX * 0.03), 105 + (mouseY * 0.04), 325 + (mouseX * 0.03), 180 + (mouseY * 0.04), 260 + (mouseX * 0.03), 150 + (mouseY *0.04)); fill(232, 120, 130); triangle(170 + (mouseX * 0.03), 115 + (mouseY * 0.04), 220 + (mouseX * 0.03), 150 + (mouseY * 0.04), 165 + (mouseX * 0.03), 180 + (mouseY *0.04)); triangle(320 + (mouseX * 0.03), 115 + (mouseY * 0.04), 320 + (mouseX * 0.03), 180 + (mouseY * 0.04), 270 + (mouseX * 0.03), 150 + (mouseY *0.04)); //code the kitty face fill(197, 200, 207); rect(245 + (mouseX * 0.03), 200 + (mouseY * 0.04), 170, 140, 120); fill(255); rect(240 + (mouseX * 0.03), 200 + (mouseY * 0.04), 170, 140, 120); fill(212, 132, 51); //orange rect(230 + (mouseX * 0.03), 155 + (mouseY * 0.04), 65, 50, 90); //kitty eyes fill(0); ellipse(170 + (mouseX * 0.06), 200 + (mouseY * 0.06), 15, 15); ellipse(270 + (mouseX * 0.06), 200 + (mouseY * 0.06), 15, 15); //kitty mouth ellipse(210 + (mouseX * 0.05), 220 + (mouseY * 0.06), 25, 25); ellipse(230 + (mouseX * 0.05), 220 + (mouseY * 0.06), 25, 25); fill(255); rect(220 + (mouseX * 0.05), 210 + (mouseY * 0.06), 60, 20); ellipse(210 + (mouseX * 0.05), 220 + (mouseY * 0.06), 21, 21); ellipse(230 + (mouseX * 0.05), 220 + (mouseY * 0.06), 21, 21); //kitty nose fill(232, 120, 130); ellipse(220 + (mouseX * 0.05), 215 + (mouseY * 0.06), 10, 5); //THE FISH CODE //hot fish bod fill(175); ellipse(mouseX, mouseY, 60, 20); triangle(mouseX + 10, mouseY - 10, mouseX + 40, mouseY, mouseX + 10, mouseY +10); triangle(mouseX + 30, mouseY, mouseX + 50, mouseY - 10, mouseX + 50, mouseY +10); //fish lines strokeWeight(1); stroke(96, 97, 96); line(mouseX - 15, mouseY, mouseX - 20, mouseY - 5); line(mouseX - 15, mouseY - 5, mouseX - 20, mouseY); stroke(116, 117, 117); line(mouseX - 15, mouseY + 6, mouseX - 5, mouseY - 7); line(mouseX - 5, mouseY + 7, mouseX + 5, mouseY - 7); line(mouseX + 5, mouseY + 7, mouseX + 15, mouseY - 6); } //MOUSE PRESSED MAKES KITTY MEOW void mousePressed() { println("Meow"); }