xxxxxxxxxx
let P=p=f=0
setup=_=>{
createCanvas(W=400,W,WEBGL)
noStroke()
p=PI/8
P=PI+2
}
draw=_=>{
background(0)
lights()
rotateX(sin(f)/7)
rotateY(cos(f)/9)
for(y=-P;y<P;y+=p){
for(x=-P;x<P;x+=p){
let X=x+f/4%p
let M=mag(X,y)
push()
translate(X*60,y*60,M*-49+cos(M)*90+130)
sphere(cos(X/2)*9 - abs(y)*3)
pop()
}
}
f+=.04
}
// Minimized
// f=0,draw=a=>{for(f||createCanvas(W=400,W,WEBGL),lights(P=PI+2),rotateX(sin(f)/7),rotateY(cos(f)/9),background(p=PI/8),y=-P;y<P;y+=p)for(x=-P;x<P;x+=p)push(M=mag(X=x+f/4%p,y)),translate(60*X,60*y,-49*M+90*cos(M)+130),pop(sphere(9*cos(X/2)-3*abs(y),W));f+=.04};//#つぶやきProcessing