xxxxxxxxxx
// Inspired by David Crooks' sketch "tendrils"
// https://www.openprocessing.org/sketch/398747
// Random lines. Takes about a minute to render fully.
// random, PVector, frameCount, line, hair, generative, noLoop
// No interaction
void setup() {
size(650, 650);
background(0);
}
void draw() {
strokeWeight(1);
drawLines();
if (frameCount > 4000) noLoop();
}
void drawLines() {
PVector pos = new PVector(width/2, height/2);
PVector vel = new PVector(random(-1, 1), random(-1, 1));
vel.normalize();
PVector strtRad = PVector.mult(vel, random(50, 60));
pos.add(strtRad);
PVector nextPos = PVector.add(pos, vel);
for (int i = 0; i < 260; i++) {
float where1 = random(130, 250);
float where2 = random(-5,10);
if (i > where1 || i < where2) stroke(96, 124, 130, 30);
else stroke(random(220, 255), 30);
line(pos.x, pos.y, nextPos.x, nextPos.y);
pos = nextPos.get();
if (i > 200 ) vel.rotate(random(-0.3, 0.3));
else vel.rotate(random(-0.04, 0.04));
nextPos.add(vel);
}
}