Thank u so much, these tutorials are really useful! I have been able to write an extremely simple Code to do 6 randoms lines connected, as I was looking for:
void setup() {
size(600, 600);
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);
float x7 = random(0, 600);
float y7 = random(0, 600);
float x8 = random(0, 600);
float y8 = random(0, 600);
float x9 = random(0, 600);
float y9 = random(0, 600);
float x10 = random(0, 600);
float y10 = random(0, 600);
float x11 = random(0, 600);
float y11 = random(0, 600);
float x12 = random(0, 600);
float y12 = random(0, 600);
stroke(0, 0, 0);
strokeWeight(3);
line(x1, y1, x2, y2);
line(x2, y2, x3, y3);
line(x3, y3, x4, y4);
line(x4, y4, x5, y5);
line(x5, y5, x6, y6);
line(x6, y6, x7, y7);
line(x7, y7, x8, y8);
line(x8, y8, x9, y9);
line(x9, y9, x10, y10);
line(x10, y10, x11, y11);
line(x11, y11, x12, y12);
line(x12, y12, x1,y1);
}