xxxxxxxxxx
function setup() {
createCanvas(640, 640);
colorMode(HSB,360,100,100);
}
function draw() {
background(0,0,98);
const t = radians(frameCount);
const x0 = width * 0.05;
const x1 = width * 0.95;
const v = 200;
const y = height * 0.5;
const inc = 5;
let px = x0;
strokeCap(SQUARE);
for (var x = x0; x <= x1; x += inc) {
if (x%2===0) { stroke(0,0,98); strokeWeight(5); }
else { stroke(0,0,8); strokeWeight(50); }
line(px+tan(t+50)*30,
y-cos(sqrt(x))*v-tan(t-30)*30,
x-tan(t)*30,
y+sin(x*x)*v+tan(t-50)*30);
px = x;
}
}