//--------------------------------------------------------------------------
#declare Ball = //----------------------------------------------------------

sphere{ <0,0,0>, 0.07

        texture { pigment{ color rgb<1.00, 0.35, 0.00>*0.9 }
                  finish { phong 1.0 reflection{ 0.10 metallic 0.5} }
                } // end of texture

        scale<1,1,1>  rotate<0,0,0>  translate<0,0,0>
      } // end of sphere ---------------------------------------------------
//-------------------------------------------------------------------------- 


//------------------------------------
#declare R_major = 3.50;
#declare R_minor = 1.00;
#declare R_inner = 0.30;
#declare N_maj = 16;
#declare N_min = 18;
#declare N_in  = 100;
//------------------------------------
union{
#declare Nr = 0;      // start loop
#while (Nr < N_maj*N_min*N_in)
object{Ball
 translate<0,0,R_inner>
 rotate<0,Nr * 360/N_in,0>
 translate<R_minor,0,0>
 rotate<0,0,Nr * 360/(N_min*N_in)>
 translate<R_major,0,0>
 rotate<0,
    Nr * 360/(N_maj*N_min*N_in),0>}
 #declare Nr = Nr + 1;  // next Nr
#end // ------------ end of loop -----

scale<1,1,1>
rotate<0,0,0>
translate<0,1.3,0> // no_shadow
} // end of union
//------------------------------------
//------------------------------------

