Hello @Smail_OUABED,
It is! Keep at it!
Here is a partial example without the for() loops:
size(600, 600, P3D);
translate(width/2, 400); // origin is a center of screen
rotateX(radians(80)); // So you can see it!
noFill();
circle(0, 0, 200);
pushMatrix();
rotateZ(radians(10));
translate(100, 0, 0);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(20));
translate(100, 0, 0);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(30));
translate(100, 0, 0);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(40));
translate(100, 0, 0);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
// And so on...
// And then the next layer...
pushMatrix();
rotateZ(radians(0));
translate(100, 0, 20);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(10));
translate(100, 0, 20);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(20));
translate(100, 0, 20);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(30));
translate(100, 0, 20);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
pushMatrix();
rotateZ(radians(40));
translate(100, 0, 20);
fill(255, 0, 0);
box(15, 5, 5);
popMatrix();
// And so on...
Code generates this:
Look for patterns that repeat and increment that you can use in a nested for() loop.
You can reduce the above to nested for() loops to generate:
:)