Nested Circles


In this exercise, we will place objects in a circular path with decreasing radius. This exercise takes concept from Circle of Objects and Grid 3D exercises.


For the outcome of this exercise, we want to have circles of objects stacked behind each other with decreasing radius.

In the Circle of Objects exercise, the essential variables were the number of objects, countObj, and the radius of the circular path. We would need those same variables except that for the radius; let’s have a start radius and end radius instead. Also, the circles would be stacked behind each other along the z axis, therefore we would need the size of the dimension (dimZ), the amount of rows we want on the z axis (countZ) and the size of each segment (segDimZ).

 this.countObj = 30;
 this.radiusStart = 20;
 this.radiusEnd = 5;
 this.radius = 0;
 this.dimZ = 40;
 this.countZ = 5;
 this.segDimZ = this.dimZ/(this.countZ-1);

Now lets set up the loop to place the objects.

See the Pen Nested Circle by XR Club (@xrclub) on CodePen.

Leave a Reply

Your email address will not be published.