Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
About Loops with POV-Ray     
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

  Loops in POV-Ray
  1. For + While
       Comparison
  2. Linear
      Transformations
  3. Circular
      Transformations
>4. Moebius etc.
  5. Screws
       & Spirals
  6. Twisting
       Spirals
  7. Snails
       & Ammonites
  8. Spherical Spirals 1
  9. Spherical Spirals 2
 10. Fibonacci Spirals
                                       
 
 
  - Download

Loops and Moebius and Similar Things

If we use for double rotation a stick instead of a sphere as the basic element and reduce the number of inner rotations to 0.5 we get as so called Moebius strip - this kind of tape has only on side:

//------------------------------------
#declare P_R =0.1; #declare P_H =0.75;
#declare Profile =
union{
 sphere  {<0, P_H,0>,P_R }
 cylinder{<0,-P_H,0>,<0,P_H,0>,P_R}
 sphere  {<0,-P_H,0>,P_R }
 texture{
   pigment{color rgb<0.65,0.35,0.85>}
   finish {phong 1}}
} //----------------------------------
#declare Radius_major = 3.00;
#declare N_major =  0.5;
#declare N_minor = 2500;
//------------------------------------
#declare Nr=0;               // start
#declare EndNr=N_major*N_minor;// end
#while (Nr< EndNr)
 object{Profile
         rotate<0,0,Nr*360/N_minor>
        translate<Radius_major,0,0>
         rotate<0,Nr*360/EndNr,0>}
 #declare Nr = Nr + 1; //next Nr_minor
#end // --------------- end of loop --
Scene file for POV-Ray: povloopm.pov
or: povloopm.txt

If we change the number
of the inner rotations to 2.5,
we will see the following:

//----------------------------------
#declare N_major = 2.5;
//----------------------------------

In the case of integer numbers of inner rotations we are getting tapes with 2 surfaces, in the case of 0.5 , 1.5, 2.5 etc. inner rotations we will get a tape with only one side.

Scene file for POV-Ray: povloopn.pov
or: povloopn.txt

//---------------------------------
#declare P_R = 0.2;
#declare P_H = 0.65;
#declare Profile =
union{
 sphere  {<0, P_H,0>,P_R  }
 cylinder{<0,-P_H,0>,<0,P_H,0>,P_R}
 cylinder{<0,-P_H,0>,<0,P_H,0>,P_R
          translate<0.01,0,0>
 texture{pigment{color rgb<1,.65,0>}
         finish {phong 1}}}
 sphere  {<0,-P_H,0>,P_R }
 texture{pigment{color
                 rgb<1,0.3,0.7>}
         finish {phong 1}}}
//---------------------------------
#declare N_major = 4;
//---------------------------------
Scene file for POV-Ray: povloopo.pov
or: povloopo.txt


top

© Friedrich A. Lohmüller, 2014
www.f-lohmueller.de