File: 35%20-%20random%20tuft%20of%20grass.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 (32 lines) | stat: -rw-r--r-- 1,215 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
//------------------------------------------------------------- 
//------------------------------------------------------------- 
#declare Random_1 = seed (23484);
#declare Random_2 = seed (35271);
#declare Blade_Radius = 0.01;
#declare Blade_Height = 1.00; 

//-------------------------------------------------------------
union{ //------------------------------------------------------

 #local Nr = 0;   // start
 #local End = 70; // end
 #while (Nr< End) 
     cone{ <0,0,0>,Blade_Radius,
           <0,Blade_Height+0.50*rand(Random_1),0>,0.00
           texture { pigment{ color rgb< 0.5, 1.0, 0.0> } 
                     normal { bumps 0.5 scale 0.05 }
                     finish { phong 1 reflection 0.00}
                   } // end of texture 
           rotate<0,0,Nr*70/End> 
           translate<0,0,0> 
           rotate<0,Nr * 360/End+360*rand(Random_2),0>
         } //---------------------------

 #local Nr = Nr + 1;    // next Nr
 #end // ---------------  end of loop 

rotate<0,0,0>
translate<0,0,0>
} // end of union ---------------------------------------------
//------------------------------------------------------------- 
//-------------------------------------------------------------