xxxxxxxxxx
28
let n = 0.0;
let m = 0.0;
function setup() {
createCanvas(400, 400);
noStroke();
}
function draw() {
background(220);
push();
translate(200, 0);
for (let i=0; i<=height; i+=10){
fill(map(i, 0, height, 0, 255))
beginShape();
vertex(-200, height);
for (let j=-200; j<=width/2; j+=10){
push();
translate(j, 0);
vertex(j, i - noise(m + j / 100, n + i / 100) * (200-abs(j))/1.5);
pop();
}
vertex(width, height);
endShape(CLOSE);
}
pop();
n += 0.005;
}