xxxxxxxxxx
95
function setup() {
createCanvas(600, 400);
}
function mousePressed(){
save("Windows.jpg")
}
function draw() {
background(220);
for (var x = 50; x <= width; x += 190){
var y = 50;
fill("SlateGrey");
rect(x+ 10, y, 140, 250);
fill("Black");
rect(x, y, 140, 250);
rect(x + 20, y + 10, 50, 60);
rect(x + 80, y + 10, 50, 60);
rect(x + 80, y + 80, 50, 60);
rect(x + 80, y + 150,50, 70);
//LongWindow
fill("SlateGray");
rect(x + 20, y + 80, 50, 140);
//Nest with egg
fill("white");
ellipse( x + 1, y - 15, 20, 25);
fill("Sienna");
ellipse(x + 7, y + 6, 22, 22);
ellipse(x - 7, y - 4, 28, 20);
ellipse(x + 7, y - 4, 28, 20);
ellipse(x + 1, y - 7, 22, 20);
//window1
fill("Turquoise");
rect(x + 20, y + 10, 25, 30);
fill("LimeGreen");
rect(x + 20, y + 40, 25, 30);
fill("Plum");
rect(x + 45, y + 10, 25, 30);
fill("Turquoise");
rect(x + 45, y + 40, 25, 30);
//window2
fill("Turquoise");
rect(x + 80, y + 10, 25, 30);
fill("LimeGreen")
rect(x + 80, y + 40, 25, 30);
rect(x + 105, y + 10, 25, 30);
fill("Plum");
rect(x + 105, y + 40, 25, 30);
//window 3
fill("Plum");
rect(x + 80, y + 80, 25, 30);
fill("LimeGreen");
rect(x + 80, y + 109, 25, 30);
fill("Turquoise");
rect(x + 105, y + 80, 25, 30);
fill("Plum");
rect(x + 105, y + 109, 25, 30);
//window 4
fill("IndianRed");
rect(x + 80, y + 150, 25, 35);
fill("LimeGreen");
rect(x + 105, y + 150, 25, 40);
fill("Plum");
rect(x + 80, y + 180, 25, 40);
fill("Turquoise");
rect(x + 105, y + 180, 25, 40);
//BottomPart and TopPart
fill("SlateGray")
rect(x - 10, 290, 170, 10);
fill("SlateGray");
rect(x-10, y, 170, 10);
rect(x-10, y + 10, 170, 10);
rect(x-10, y + 6, 170, 10);
rect(x - 10, y + 3, 170, 10);
}
}