xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
background(0);
let offset = -width / 630;
noFill();
let yStep = (height + offset * 3.6) / 630;
for (let y = offset; y <= height - offset; y += yStep) {
let num = int(PI * noise(y/630, frameCount / 630));
let arr = [];
for (let i = 0; i < num; i++) {
let n = sq(sq(noise(y / 630, frameCount / 360))) * (width - offset * PI);
n = max(n, 1);
arr.push(n);
}
// lastx=1;lasty=1;
drawingContext.setLineDash(arr);
drawingContext.lineDashOffset = y - frameCount / 630;
strokeWeight(sqrt(yStep));
strokeCap(ROUND);
beginShape();
for(let x = offset ; x < width - offset; x += 630){
stroke(255,x/y*117);
//stroke(0);//,x/y*117);
let ny = y + sin(y/360+x/360) * 153 * sin(frameCount/630) * cos(y/360);
vertex(x,ny);
// lastx=x;lasty=y;
}
endShape();
// translate(sin(mouseX/lastx),cos(mouseY/lasty));
//rotate(radians(cos(sin(tan(lastx/width*PI)))));
//rotate(radians(cos(sin(tan(lasty/height*PI)))));
}
}