function setup() {
createCanvas(windowWidth, windowHeight);
mousePressed();
}
function mousePressed() {
background(0);
noStroke();
var ndistort = random(10000);
var nw = random(10000);
var nh = random(10000);
for (var h = 0; h < height; h++) {
nw += map(pow(noise(h * 0.007 + ndistort), 4) - pow(0.5, 4), -1, 1, -0.3, 0.3);
for (var w = 0; w < width; w++) {
var n = noise(w * 0.005 + nw, h * 0.005 + nh);
var cl = sin(map(n, 0, 1, 0, TWO_PI * 3));
if (cl < 0) {
stroke(lerpColor(color(246, 191, 215), color(247, 247, 198), map(cl, -1, 0, 0, 1)));
} else {
stroke(lerpColor(color(247, 247, 198), color(175, 221, 231), map(cl, 0, 1, 0, 1)));
}
point(w, h);
}
}
}
function draw() {
}