xxxxxxxxxx
32
function setup() {
createCanvas(600, 400);
}
function draw() {
background(211, 211, 211);
noStroke();
// syntax: triangle(x1, y1, x2, y2, x3, y3)
// big triangles
fill(0); // same as fill (0, 0, 0) - big triangles color
triangle(0, 350, 150, 20, 300, 350); // left
triangle(300, 350, 450, 20, 600, 350); // right
stroke(255, 0, 0);
// point(mouseX, mouseY);
// point(width/2, height/2);
// small triangles
fill(217, 205, 66) // small triangles color
triangle(126, 72, 150, 20, 174, 72) // left
triangle(426, 72, 450, 20, 474, 72) // right
// random faint lines
stroke(0);
strokeWeight(0.25);
line(0,100,600,100);
line(0,200,600,200);
}