/*//////////////////////////////////////////////////////// // Interactive Drawing // // Hunted // // Austin Waterson // // Media Computation // *///////////////////////////////////////////////////////// void setup() { size(400,400); //No outline on shapes noStroke(); } void draw() { //Setting background to a dark purple background(61,0,61); //Background trees and earth fill(0); //Earth rect(0,250, 400,400); //Trees// //Tree1 rect(pmouseX,0, 30,400); //Tree2 rect(pmouseX+100,0,30,400); //Tree3 rect(pmouseX+200,0, 30,400); //Tree4 rect(pmouseX+360,0, 30,400); //Tree5 rect(pmouseX,-30, 30,400); //Tree6 rect(pmouseX-100,0,30,400); //Tree7 rect(pmouseX-200,0, 30,400); //Tree8 rect(pmouseX-360,0, 30,400); //Middleground trees, earth, and eyes //Eyes fill(255,255,0); //If mouse is pressed eyes blink if (mousePressed) { fill(0); } //Eye arcs //Left eye arc(190,270, 10,10, 0, PI-QUARTER_PI); //Right eye arc(220,270, 10,10, 0, PI-QUARTER_PI); fill(5); //Earth rect(0,300, 400,400); //Trees// //Tree1 rect(mouseY,0, 50,400); //Tree2 rect(mouseY+150,0, 50,400); //Tree3 rect(mouseY+300,0, 50,400); //Tree4 rect(mouseY-150,0, 50,400); //Tree5 rect(mouseY-300,0, 50,400); //Tree6 rect(mouseY-400,0, 50,400); //Foreground trees and earth fill(0); //Ground rect(0,350, 400,400); //Trees// //Tree1 rect(mouseX+50,0, 70,400); //Tree2 rect(mouseX+230,0, 70,400); //Tree3 rect(mouseX+360,0, 70,400); //Tree4 rect(mouseX-100,0, 70,400); //Tree5 rect(mouseX-230,0, 70,400); //Tree6 rect(mouseX-360,0, 70,400); }