float m = 0;
void setup(){
fullScreen(P3D);
}
void draw(){
background(250);
rotateX(frameCount * 0.01);
translate(400,500);
for(float m = 0; m < 5; m++){
pushMatrix();
for(float i = 0; i < 80; i++){
translate(sin(frameCount * 0.005 + m) * 10, sin(frameCount * 0.005 + m) * 10, i * 1);
rotateY(frameCount * 0.005);
pushMatrix();
fill(40);
rect(100, 6, 20,5);
popMatrix();
}
popMatrix();
}
}
I would like this design to be centered on my screen and not floating above. Can you help?