POV-Ray Raytracer Descriptions and Examples by Friedrich A. Lohmüller
   Random with POV-Ray (Part 5)
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

Random in POV-Ray
   - RandomNumbers in Loops
   - quadratic + cubic
   - Colors + Scale
   - Tilting + Bending
  > Trees by Random
   - Include File 'rand.inc'
   - Filled height_field
   - Random Flower

  - Insert Menu Add-on
    & Download
 
                                       
 Randomized Planting of Trees      

How to plant a serie of trees semi-irregularly with a nested while loop.
For details on how to make this tree we use here, please take a look in the according scene file.

If we are planting trees with a nested while loop the result will be unnaturally regular. May be this way is good for cutting down these trees but not very nice to look at!


 
 
 
 
 
 

Randomized size,
randomized tilting and
randomized rotating:

//-----------------------------------
// tilting around z direction
rotate<10*2*(0.5-rand(Random_3)),0,0>
// turning around y axis
rotate<0,360*rand(Random_0),0>
// changing scale
scale  1+0.5*rand(Random_1)
///----------------------------------

Randomized moving:

//-----------------------------------
// shifting in x and z:
translate
 < NrX*2.75+2*(-0.5+rand(Random_2)),
   0,
   NrZ*2.75+2*(-0.5+rand(Random_2))>}
///----------------------------------

 
 
 

Another view of this little wood:


 
 
 
 
 
 
 
 
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
top

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