Goal: make a line that grabs the endpoint of the previous line as a starting point.

float x1 = 400;
float y1 = 400;
float x2 = 400;
float y2 = 400;
int n = 0;
void setup() {
  size(800 , 800);
  background(255);
}

void draw() {
  
print(n);

  if (n < 10);{
    stroke(0,0,0,63);
    x1 = random(50,750);
    y1 = random(50,750);
    line(x1,y1,x2,y2);
 
    x2 = x1;
    y2 = y1;
    delay(10);
    n = n + 1;
    }
    saveFrame("test-####.png");
  }