That is exactly the first idea that I had
void setup() {
size(600, 600);
noStroke ();
background(255,255,255);
float x1 = random(0, 600);
float y1 = random(0, 600);
float x2 = random(0, 600);
float y2 = random(0, 600);
float x3 = random(0, 600);
float y3 = random(0, 600);
float x4 = random(0, 600);
float y4 = random(0, 600);
float x5 = random(0, 600);
float y5 = random(0, 600);
float x6 = random(0, 600);
float y6 = random(0, 600);
fill(random(0, 255), random(0, 255), random(0,255));
beginShape();
vertex(x1,y1);
vertex(x2,y2);
vertex(x3,y3);
endShape();
fill(random(0, 255), random(0, 255), random(0,255));
beginShape();
vertex(x3,y3);
vertex(x4,y4);
vertex(x5,y5);
endShape();
fill(random(0, 255), random(0, 255), random(0,255));
beginShape();
vertex(x4,y4);
vertex(x5,y5);
vertex(x6,y6);
endShape();
}
But I would like to fill the whole screen with polygons, so I dont know how could I do that with all of the VertexEs