// PoVRay 3.1 Scene File "loops7h_1.pov"
// created by   Friedrich A. Lohmueller, 2000
#include "colors.inc"
#include "textures.inc"
// camera --------------------------------------------------------------
#declare Cam1 = camera {ultra_wide_angle angle  120
                        location  < 5.0 , 6.0 ,-8.0>
                        look_at   < 0.2 ,-0.3 ,  0.0>}
camera{Cam1}
// sun -----------------------------------------------------------------
light_source{<1800,2500,-2500> color White}
// sky -----------------------------------------------------------------
#declare Orange_Yellow = color rgb<1,0.8,0>;
sphere{<0,0,0>,1 hollow
       texture{pigment{gradient <0,1,0>
                       color_map{[0 color White]
                                 [1 color Orange_Yellow]}
                       quick_color White }
               finish {ambient 1 diffuse 0}
              }
       scale 10000}

//----------------------------------------------------------------------
#declare Profile_R = 0.2;
#declare Profile_H = 0.65;
#declare Profile = 
union{
 sphere  {<0,0,0>,Profile_R  translate<-1.75*Profile_H,-Profile_H,-0.4> rotate<0,10,0>}

 sphere  {<0,0,0>,Profile_R  translate<-Profile_H,-Profile_H,0>}
 sphere  {<0,0,0>,Profile_R  translate< Profile_H,-Profile_H,0>}
 sphere  {<0,0,0>,Profile_R  translate<-Profile_H, Profile_H,0>}
 sphere  {<0,0,0>,Profile_R  translate< Profile_H, Profile_H,0>}
 cylinder{<0,-Profile_H,0>,<0, Profile_H,0>,Profile_R translate< Profile_H,0,0>}
 cylinder{<-Profile_H,0,0>,< Profile_H,0,0>,Profile_R translate<0,-Profile_H,0>}

 texture{
         Polished_Chrome // pigment{color rgb<0,0,0>}
         finish {ambient 0.25 diffuse 0.55 phong 1}}}

#declare R_major   = 3.00;
//#declare R_minor = 1.00;
#declare N_major = 4;
#declare N_minor = 40;
//---------------------------------------------------------
union{
#declare Nr = 0;                  // start
#declare EndNr = N_major*N_minor; // end
#while (Nr< EndNr) 
 object{Profile
         
        rotate<0,0,Nr * 360/N_minor>
        
        translate<R_major,0,0> 
        rotate<0,Nr * 360/EndNr,0>} 

 #declare Nr = Nr + 1;  // next Nr
#end // --------------- end of loop -------------------------------------
rotate<0,100,0>}