xxxxxxxxxx
22
function setup() {
createCanvas(400, 400);
background(220);
noLoop();
}
function draw() {
strokeWeight(2);
let col1 = color(80, 20, 20);
let col2 = color(200, 0, 0);
for (let x = 10; x <= 390; x++) {
for (let y = 10; y <= 390; y++) {
let d = dist(width/2,height/2,x,y);
d += noise(x/100,y/100)*400;
let fraction = pow(sin(d/5),1.1);
c = lerpColor(col1,col2,fraction);
stroke(c);
point(x, y);
}
}
}