//MY HOUSE //Created by Gary Munoz-Villarreal float sunX=50,sunY=50; // initiating float float dogX,dogY; float heroX,heroY; void setup() { // DRAW BOX size( 600, 600); } void draw() { // coloring sky background( 0, 191, 255); // DRAWING AND COLORING SUN fill( 255, 255, 0); ellipse(sunX, sunY, 90, 90); //movement: sun crosses sky, reset to left side. if (sunX > width) { sunX= 0; } sunX= sunX + 1; //drawing grass fill(0, 128, 0); rect(0, 400, 600, 400); //drawing tree trunk & leaves & branches fill(139, 69, 19); rect(25, 200, 50, 200); fill(107, 142, 35); ellipse(50, 200, 150, 50); line(50, 300, 110, 300); line(50, 350, 110, 350); line(50, 250, 110, 250); //creating house & coloring fill(25, 25, 112); rect(485, 350, 100, 50); fill(138, 43, 226); triangle(485, 350, 585, 350, 535, 240); // Set ellipses and rects to CENTER mode //creating gold hero basic fill(225, 215, 0); rect(mouseX-25, mouseY, 50, 100); ellipse(mouseX, mouseY-30, 60, 60); // creating hero variable heroX=mouseX; heroY=mouseY; //creating black dog fill(0, 0, 0); ellipse(dogX, dogY, 125, 50); fill(0, 0, 0); ellipse(dogX-75, dogY, 50, 50); line(dogX-25, dogY, dogX-30, dogY+65); line(dogX-45, dogY, dogX-50, dogY+65); line(dogX+25, dogY, dogX+25, dogY+65); line(dogX+45, dogY, dogX+45, dogY+65); dogX= dogX + (heroX-dogX) /100; dogY= dogY + (heroY-dogY)/100; //Text name in lower right and title in center textSize(40); fill(0, 0, 0); text("Welcome to my home", 150, 150); textSize(30); fill(139, 0, 139); text("Gary Munoz-Villarreal", 270, 575); }