File: 08%20-%20while%20loop%20circular%20single%20helix.txt

package info (click to toggle)
povray 1%3A3.7.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 146,780 kB
  • sloc: cpp: 845,005; ansic: 122,118; sh: 34,206; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,387; cs: 879; awk: 590; perl: 245; xml: 95
file content (41 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//--------------------------------------------------------------------------
#declare Ball = //----------------------------------------------------------

sphere{ <0,0,0>, 0.25

        texture { pigment{ color rgb<0.8,0.1,0.1>}// 0.35, 0.00>*0.9 }
                   finish { phong 1.0  reflection{ 0.05 metallic 0.3} }
                } // 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 = 20;
#declare N_min = 200;
#declare N_in  = 100;
//------------------------------------
union{
#declare Nr = 0;             //start
#declare EndNr=N_maj*N_min;//end
#while (Nr < EndNr)
object{Ball
       translate<R_minor,0,0>
       rotate<0,0,Nr * 360/N_min>
       translate<R_major,0,0>
       rotate<0,Nr * 360/EndNr,0>}
 #declare Nr = Nr+1;  // next Nr
#end // ---------- end of loop -------

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