float x = random(width); float y = random(height); float x2 = 0; float y2 = 0; float tempx = 0; float tempy = 0; void setup() { size(400, 400); strokeWeight(10); smooth(); background(100); frameRate(12); } void draw() { x2 = random(-width, width); y2 = random(-height, height); stroke(random(255)); line(x, y, x2, y2); x = x2; y = y2; }