// Add your variables here void setup() { size(600, 600); background(#BDEDF0); smooth (); } void draw() { house(100, 100); //lt yellow snowman snow(300, 200, #E3D91E); //red snowman snow(40, 400, #E02238); //lt blue snowman snow(500, 10, #69C5DE); //lt green snowman snow(10, 70, #8CE347); //lav snowman snow(560, 36, #B079DE); //dark yellow snowman snow(450, 500, #D8A71F); //first happy guy happy(300, 400, 100); //second happy guy happy(400, 100, 20); //third happy guy happy(100, 200, 45); //fourth happy guy happy(50, 500, 30); //fourth happy guy happy(500, 500, 50); //cat 1 caterpillar (10, 560, 10, #34ADE8, 7); //cat 2 caterpillar (20, 10, 6, #E834AC, 5); //cat 3 caterpillar (250, 300, 30, #436C3F, 10); //cat 4 caterpillar (300, 100, 15, #7980F5, 4); //cat 5 caterpillar (200, 500, 15, #D62D4C, 12); } // Draws a house // xpos - the x position of the house // ypos - the y position of the house void house(int xpos, int ypos) { stroke(125); fill(125); rect(xpos, ypos, 30, 30); line(xpos - 5, ypos + 5, xpos + 15, ypos - 15); line(xpos + 15, ypos - 15, xpos + 35, ypos + 5); } void snow(int snowX, int snowY, color snowColor) { // draw a snow man fill (snowColor); noStroke (); ellipse(snowX, snowY+20, 15, 15); ellipse(snowX, snowY +8, 10, 10); ellipse(snowX, snowY, 5, 5); } void happy(float happyX, float happyY, float happySize) { // draw mr happyface noStroke (); fill (#FAE844); //face ellipse (happyX, happyY, happySize, happySize); //left eye fill (0); ellipse (happyX - (happySize/5), happyY - (happySize/5), happySize / 5, happySize / 5); //right eye fill (0); ellipse (happyX + (happySize/5), happyY - (happySize/5), happySize / 5, happySize / 5); //mouth stroke (0); line (happyX - (happySize/4), happyY +(happySize/4), happyX +(happySize/4), happyY +(happySize/4)); } // caterpillar function - Draws a fancy caterpillar! void caterpillar(int catX, int catY, int catSize, int catColor, int segments) { /* Parameters catX = X position for top left catY = Y position for top left catSize = ellipse radius catColor = color of body segments segments = number of body segments */ // draw head //antenna color stroke(0); //left antenna line(catX-catSize/2, catY-catSize, catX, catY+catSize/2); //right antenna line(catX+catSize/2, catY-catSize, catX, catY+catSize/2); //the head is always dk brown with no stroke noStroke(); fill(#330000); //head circle ellipse(catX, catY, catSize, catSize); //draw eyes //eye color fill(255); //no stroke around eyes noStroke(); //left eye ellipse(catX-3, catY, 2, 2); //right eye ellipse(catX+2, catY, 2, 2); // assign a color for the body fill(catColor); // draw body segment // tell it how many segments to draw with a for loop // max number is number of segments for(int i=0; i