/************************************** * File Name: Sanny Day *Author: Thomas Miskey *Date: Sept 21, 2016 Description: An interactive drawing featuring a super happy tree and a smiling sun. *The mouse controls a small bug and where the tree looks. ***************************************/ void setup() { //backgrounnd size size(400, 400); } void draw() { //Draw sky blue background background(0, 141, 230); //Remove borders smooth(); noStroke(); //Draw grassy hill fill(24, 134, 6); ellipse(200, 400, 550, 150); //Tree trunk and roots fill(93, 59, 0); rect(300, 100, 80, 250); triangle(310, 350, 280, 370, 310, 300); triangle(350, 300, 400, 370, 360, 350); triangle(310, 250, 260, 170, 350, 200); //Tree leaves fill(0, 118, 47); ellipse(330, 80, 250, 160); //Sunlight spikes fill(245, 255, 89); triangle(200, 130, 120, 50, 80, 120); triangle(60, 140, 70, 50, 130, 180); triangle(100, 100, 0, 90, 60, 190); triangle(210, 20, 138, 70, 140, -3); triangle(100, 100, -10, 130, 10, 210); //Sun center fill(255, 210, 4); ellipse(19, 18, 260, 260); //Sun face fill(255, 255, 255); ellipse(35, 40, 30, 60); ellipse(85, 40, 30, 60); fill(0, 0, 0); ellipse( 50, 100, 60, 60); fill(255, 210, 4); ellipse(51, 97, 65, 55); //Tree eyes fill(255, 255, 255); ellipse(355, 200, 15, 30); ellipse(325, 200, 15, 30); //Tree smile ellipse(340, 250, 50, 40); fill(93, 59, 0); rect(300, 230, 70, 20); fill(0, 0, 0); rect(353, 250, 2, 17); rect(343, 250, 2, 20); rect(333, 250, 2, 20); rect(323, 250, 2, 17); rect(317, 257, 46, 2); //Sun pupils (follow cursor) fill(0); ellipse(85 + mouseX/45, 40 + mouseY/30, 10, 30); ellipse(35 + mouseX/45, 40 + mouseY/30, 10, 30); //Tree pupils (follow cursor) ellipse(350 + mouseX/40, 195 + mouseY/35, 7, 15); ellipse(320 + mouseX/40, 195 + mouseY/35, 7, 15); //Flower stem noFill(); stroke(6,255,0); strokeWeight(5); bezier(125,300,135,350,135,430,130,330); //Flower petals noStroke(); fill(255, 66, 66); ellipse(105, 300, 30, 30); ellipse(115, 280, 30, 30); ellipse(130, 300, 30, 30); fill(245, 255, 89); ellipse(115, 294, 20, 20); //Fly(follow cursor) fill(211, 211, 211); ellipse(5 + mouseX, -5 + mouseY, 15, 12); ellipse(-5 + mouseX, -5 + mouseY, 15, 12); fill(0, 0, 0); ellipse(mouseX, mouseY, 10, 10); }