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.