Here we show how to colorize and size a serie of objects irregularly.
For this we use a serie of spheres, which we arrange in a square or in a cube with a while loop.
|
Randomized Color Selection:
We choose a new serie of random numbers
and replace in the previous samples the color in the texture statement
i.e. as follows:
//------------------------------------
#declare Random_3 = seed (1432);
#declare Random_4 = seed (7242);
#declare Random_5 = seed (9912);
//------------------------------------
...
pigment{ color rgb< rand(Random_3),
rand(Random_4),
rand(Random_5)> }
... etc.
|
|
Scene file for POV-Ray: .pov
or .txt
|
Only rgb values between 0 and 1 are giving realistic tones
of colors with full contrast in the shades.
Fine shades of colors we get if we add only smaller randomized parts
to some base rgb values as follows:
//------------------------------------
#declare Random_3 = seed (1432);
#declare Random_4 = seed (7242);
#declare Random_5 = seed (9912);
//------------------------------------
...
pigment{
color rgb
< 1.00 - 0.35*rand(Random_3),
0.65 + 0.2*(-0.5+rand(Random_4)),
0.00 + 0.75*(rand(Random_5)> }
... etc.
|
|
Scene file for POV-Ray: .pov
or .txt
|
And now the same thing in three dimensions:
|
|
Randomized Scaling:
Therefor we add the according random value to the scale term:
scale < 1, 0.1+2*rand(Random_1), 1 >
|
|
Click on the image for a higher resolution!
|