xxxxxxxxxx
50
// landscape by Britney Moreno
function setup() {
createCanvas(510, 400);
landscape();
}
function landscape() {
background("rgb(190,227,239)");
fill("rgb(209,229,209)4)");
rect(0, 300, width, 100);
noStroke();
for (var x = 50; x <= width; x +=50){
var y= random (20, 140);
cloud(x,y,"white");
var s=random(40,100);
tree(x+10,220,s,"rgba(139,93,38,0.77)");
snow(x,y+100,"white");
snow(x-20,y+220,"white");
}
}
function cloud(x,y,c){
fill(c);
circle(x, y,50);
circle(x +20,y+20,50);
circle(x-20,y+20,50);
}
//clouds
function tree(x,y,height,s){
fill("brown");
rect(x,y,20,115,5);
fill("rgb(10,94,10)");
triangle(x-50,y+ height,x,y-80,x +50, y+ height);
}
//trees
function snow(x,y,c){
fill(c);
circle(x, y, 10);
circle(x+50,y+10, 20);
circle(x-20, y+20,20);
}
//snow