xxxxxxxxxx
24
let offset = 0;
let spread;
function setup() {
createCanvas(400, 400);
background(200)
spread = width
stroke(255);
}
function draw() {
background(0);
let a = 0.0;
let inc = TWO_PI / spread;
for (let i = 0; i <= spread; i++) {
let n = noise(offset+i/100)*100
let lineHeight = ((1 - sin(a + PI / 2)) * n)
line(i, height - lineHeight, i, height);
a = a + inc;
}
offset += 0.1;
}