Modify a text file: $/project_1.pde
$/project_1.pde
//Project 1 //Mark Pepra //Global declarations float xDir=1, yDir=1; float xPup, yPup; float xSun, ySun, xHouse, yHouse; float horizon; float x, y; //setup void setup() { size (700, 600); horizon = 350; smooth(); xSun=width/15; ySun=60; //x=width/2; //y=height/2; } //draw sky sun person grass house dog void draw() { //scene sky sun grass house person dog //bluesky background(173,199,232); //green grass fill(10,144,47); rect(0,horizon,700,600); //sun noStroke(); fill(242,242,56); //ellipse(100, 100,50,50); ellipse(xSun,100,50,50); xSun = xSun + 2; if (xSun > width+20) { xSun = -20; } //tree stroke(0,0,0); fill(200,50,50); rect(500,255,30,105); fill(200,255,100); ellipse(515,230,70,70); //houseeee fill(227, 158, 167); rect(50, 220, 180, 180); fill(0, 0, 0); triangle(47, 220, 233, 220, 140, 130); //windows fill(255); rect(60, 250, 50, 50); rect(170, 250, 50, 50); //door fill(193, 70, 209); rect(110, 330, 50, 70); ellipse(135, 330, 50, 50); //knob fill(255, 255, 0); ellipse(155, 355, 10, 10); //person fill(11,57,111); //rect(400,300,50,150); //rect(x+400,y+300,50,150); x=x+2; y=y+2; if (x > width-150 || x < 150) { xDir *= -1; } if (y > height-150 || y < 150) { yDir *= -1; } rect(x+400,y+300,50,150); //head fill(83,6,147); ellipse(425,300,50,50); //eyes fill(255); ellipse(410,300,9,9); ellipse(435,300,9,9); //doggggggg Pup //body fill(250,120,0); rect(280,300,100,50); //head rect(260,280,60,40); //eyes fill (255); ellipse(270,290,9,9); } //sun noStroke(); fill(242,242,56); ellipse(100, 100,50,50); //tree stroke(0,0,0); fill(200,50,50); rect(500,255,30,105); fill(200,255,100); ellipse(515,230,70,70); //houseeee fill(227, 158, 167); rect(50, 220, 180, 180); fill(0, 0, 0); triangle(47, 220, 233, 220, 140, 130); //windows fill(255); rect(60, 250, 50, 50); rect(170, 250, 50, 50); //door fill(193, 70, 209); rect(110, 330, 50, 70); ellipse(135, 330, 50, 50); //knob fill(255, 255, 0); ellipse(155, 355, 10, 10); //person fill(11,57,111); rect(400,300,50,150); //head fill(83,6,147); ellipse(425,300,50,50); //eyes fill(255); ellipse(410,300,9,9); ellipse(435,300,9,9); //doggggggg Pup //body fill(250,120,0); rect(280,300,100,50); //head rect(260,280,60,40); //eyes fill (255); ellipse(270,290,9,9); }