float x1, y1, x2, y2; void setup() { size(500, 500); x1 = width/2; y1 = height/2; } void draw() { x2 = x1 + random(-5, 5); y2 = y1 + random(-5, 5); line(x1, y1, x2, y2); x1 = x2; y1 = y2; }