xxxxxxxxxx
function setup() {
createCanvas(w=720, h=w);
colorMode(HSB);
background(98);
push();
strokeWeight(1);
stroke(10, 0.75);
translate(w/2, h/2);
let draw_scale = 150;
let L = 1000;
let N = 100;
for(let l=0;l<L;l++){
let x = random(-1,1)*2.5;
let y = random(-1,1)*2.5;
for(let i=0;i<N;i++){
x += cos(TAU*noise(x*1.2, y*1.5, 0.2))*0.01;
y += sin(TAU*noise(x*1.5, y*1.2, 0.3))*0.01;
point(draw_scale*x, draw_scale*y);
}
}
pop();
}
//save PNG
function keyPressed() {
let name = "img_" + month() + day() + hour() + minute() + second();
save(name + ".png");
}