xxxxxxxxxx
23
let i = 80;
function setup() {
createCanvas(600, 600);
}
function draw() {
background(51);
stroke(255);
translate(width/2, height/2);
branch(i);
}
function branch(idx) {
line(0, 0, idx, idx);
translate(idx, idx);
push();
translate(idx - random(-80, 80), idx - random(-80, 80));
pop();
if (idx > 3) {
branch(idx - 1);
}
}