xxxxxxxxxx
let f=0;
let W=400;
let h=100;
setup=_=>{
createCanvas(W,W,WEBGL);
noStroke();
}
draw=_=> {
background(0);
rotateX(-PI/2);
for(x=-PI;x<PI;x+=PI/64){ // Change 64 to 32 to speed up the render
for(z=-PI;z<PI;z+=PI/64){ // Change 64 to 32 to speed up the render
push();
rotateY(f+x+z);
let Y=tan(x+z-f/1.3)*h;
translate(sin(x)*h,Y,cos(z)*h);
if(Y>0) sphere(Y/200);
pop();
}
}
sphere(30);
f+=PI/512;
}
// Minimized
// f=0,w=100,draw=a=>{for(f||createCanvas(W=400,W,WEBGL),background(0),rotateX(-PI/2),x=-PI;x<PI;x+=PI/64)for(z=-PI;z<PI;z+=PI/64)push(),rotateY(f+x+z),translate(sin(x)*w,Y=tan(x+z-f/1.3)*w,cos(z)*w),Y>0&&sphere(Y/200,W),pop();sphere(30,W),f+=PI/512};//#つぶやきProcessing