xxxxxxxxxx
23
function setup() {
createCanvas(950, 1050);
}
function draw() {
//fo background in rgb remember to close the expression ''
background('rgb(78,244,157)');
//triangle (x1,y1,x2,y2,x3,y3) top, right, left
fill(242,39,175);
triangle (475,90,675,375,275,375);
//ellipse (x,y,w,h) Default mode is center so: initial point has to be 150 points lower than triangle's bottom
fill(138,39,242);
ellipse (475,525,300,300);
//rect(x,y,w,h) It starts drawing from the top left corner so: first point most be 75 points left from triangles (and whole totems) middle
fill(39,117,242);
rect (400,675,150,200);
//triangle (x1,y1,x2,y2,x3,y3) so use botom coordinates of rectangle for x1, y1 and y2 and just move x2, x3 and y3 according to final shape
fill(242,222,39);
triangle (400,875,550,875,550,975);
}