xxxxxxxxxx
// noprotect
let palette = ["#057B6E", "#0A5050", "#041111"];
function setup() {
createCanvas(1000, 1200);
noLoop();
rectMode(CENTER);
}
function draw() {
background("#9CCEC2");
for(let i=0; i<30; i++){
let x = random(width);
let y = random(height);
let s = random(11, 352);
shuffle(palette, true);
stroke(palette[0]);
for(let a=0; a<TAU; a+=TAU/120){
noiseCurve(x + s * 0.5 * cos(a), y + s * 0.5 * sin(a));
}
push();
translate(x, y);
rotate(random(TAU));
pop();
}
}
function noiseCurve(x, y) {
let c = 20;
let px = x;
let py = y;
for (let i = 0; i < c; i++) {
let scl = 0.0001;
let angle = noise(x * scl, y * scl, i * 0.0001) * 80;
let w = map(i, 0, c - 1, 1, 0);
strokeWeight(w);
line(x, y, px, py);
px = x;
py = y;
x += cos(angle) * 20;
y += sin(angle) * 10;
}
}