let p=true;
let t=0;
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(0)
if(p){
t=t+0.0005
}
translate(width/2,height/2)
beginShape();
for(let i=floor(-width/2);i<floor(width/2);i++){
x=(i/4+t)*4;
y=(height/2.2)*cos(x)*cos(2*x)*cos(4*x);
fill(abs(y)/2,abs(y)+30,abs(y)+50)
if((y<0.128*height/2.2&&y>0.122*height/2.2)||y>-0.128*height/2.2&&y<-0.122*height/2.2){fill(50,100,0);}
circle(x,y,6)
vertex(x,y)
}
stroke(255);
strokeWeight(0.1)
noFill()
endShape()
}
function mousePressed(){
p=!p
}