Matthew Soto 2/14/13 HW 2.2

int circleX= 15;
int circleY= 20;
int circleW= 25;
int circleH= 25;
int fillX= 255;

void setup(){
background(0,0,0);//sky, light blue
fill(255, 255, 255);//Color of the sun, yellow
ellipse(circleX, circleY, 25, 25);//Shape and position of the sun
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}
void draw(){//Animation for the moon going down
fill(255, 255,255);
ellipse(circleX, circleY, 25, 25);//Shape and position of the sun
circleY= circleY+1;
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}
void mousePressed(){//When you click the mouse it turns to the day time
background(0, 159, 255);//sky, light blue
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
fill(250, 255, 0);//Color of the sun, yellow
ellipse(15, 20, 25, 25);//Shape and position of the sun
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}
void mouseDragged(){//when you drag it gives you the different shades of night.
background(0, 159, 255);//sky, light blue
background (mouseX,mouseY);
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
fill(250, 255, 255);//Color of the sun, yellow
ellipse(15, 20, 25, 25);//Shape and position of the sun
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *