POV-Ray Raytracer Descriptions and Examples by Friedrich A. Lohmüller
   Random with POV-Ray (Part 6)
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
 
                                       
 The Include File 'rand.inc'      

In the include file 'rand.inc' we can find the following functions:
For the using of these functions we first have to insert in the scene file:

#include "rand.inc"
Some of the most important funtions: (The variable 'Stream' represents the integer value of 'seed').
SRand(Stream) : a signed random number, in the range between -1 and +1.
RRand(Min, Max, Stream) : a random number in specified range of [Min, Max].
VRand(Stream) : a random point in a box from <0,0,0> to <1,1,1>.
VRand_In_Box(PtA, PtB, Stream) : a random point in a box from PtA to PtB.
VRand_In_Sphere(Stream) : a random vector of a point in a unit-radius sphere{<0,0,0>,1}.
VRand_On_Sphere(Stream) : a random vector of a point on a unit-radius sphere{<0,0,0>,1}.
VRand_In_Obj(Object, Stream) : a random point inside an arbitrary object.

Beside of these, there are many other macros for other kind of statistic distributions.
For more details on these functions see 'rand.inc'.
Rand_Normal(Mu, Sigma, Stream)
Rand_Gauss(Mu, Sigma, Stream)
Rand_Cauchy(Mu, Sigma, Stream)
Rand_Binomial(N, P, Stream)
Rand_Bernoulli(P, Stream)
Rand_Poisson(Mu, Stream)
Rand_Student(N, Stream)
Rand_Chi_Square(N, Stream)
Rand_F_Dist(N, M, Stream)
Rand_Spline(Spline, Stream)
Rand_Beta(Alpha, Beta, Stream)
Rand_Gamma(Alpha, Beta, Stream)
Rand_Tri(Min, Max, Mode, Stream)
Rand_Erlang(Mu, K, Stream)
Rand_Exp(Lambda, Stream)
Rand_Lognormal(Mu, Sigma, Stream)
Rand_Pareto(Alpha, Stream)
Rand_Weibull(Alpha, Beta, Stream)
Prob(P, Stream)
Rand_Geo(P, Stream)
VRand_In_Sphere( Random_1 )
Scene file for POV-Ray:  .pov or .txt
VRand_In_Sphere( Random_1 )+<1,1.5,0>
Scene file for POV-Ray:  .pov or .txt
VRand_On_Sphere( MyObject, Random_1 )
Scene file for POV-Ray:  .pov or .txt
VRand_In_Obj( MyObject, Random_1 )
Scene file for POV-Ray:  .pov or .txt
   
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
top

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