SketchBook

Xmas Tree

function setup(){
createCanvas(700,700)
}

function draw(){
background(98,125,161)
fill(116,80,48);
stroke(88,68,56)
strokeWeight(2)
rect(237.5,525,225,150);
line(237.5,575,462,575);
line(237.5,625,462,625);
line(350,575,350,625);
line(293.75,525,293.75,575);
line(406.25,525,406.25,575);
line(293.75,625,293.75,675);
line(406.75,625,406.25,675);
fill(134,74,43);
noStroke();
rect(300,475,100,50);
fill(0,80,46);
triangle(350,300,100,475,600,475);
triangle(350,215,170,385,530,385);
triangle(350,135,235,300,465,300);


//星
fill(255,241,0);
strokeWeight(2);
stroke(255,241,0);

beginShape();
vertex(350,55);
vertex(360,85);
vertex(390,95);
vertex(360,105);
vertex(350,135);
vertex(340,105);
vertex(310,95);
vertex(340,85);
endShape();

noStroke(0)
frameRate(12)
fill(217,57,78)
ellipse(random(305,395),random(220,240),random(5,24))
fill(253,184,109)
ellipse(random(270,430),random(255,275),random(5,24))
fill(255,255,170)
ellipse(random(235,465),random(290,310),random(5,24))
fill(252,136,152)
ellipse(random(250,350),random(340,350),random(5,24))
fill(155,114,176)
ellipse(random(215,385),random(375,395),random(5,24))
fill(76,108,179)
ellipse(random(170,530),random(405,425),random(5,24))
fill(62,179,112)
ellipse(random(135,565),random(440,460),random(5,24))

}