1 |
/* |
2 |
================================================================== |
3 |
Random number generators for photon distribution |
4 |
|
5 |
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
6 |
(c) Fraunhofer Institute for Solar Energy Systems, |
7 |
Lucerne University of Applied Sciences & Arts |
8 |
================================================================== |
9 |
|
10 |
$Id: pmaprand.c,v 4.1 2014/01/24 14:54:54 taschreg Exp taschreg $ |
11 |
*/ |
12 |
|
13 |
|
14 |
|
15 |
/* |
16 |
Separate RNG states are used for the following variates during photon |
17 |
distribution: |
18 |
|
19 |
- source partition |
20 |
- emission direction |
21 |
- emission counter fraction |
22 |
- mean free distance in medium |
23 |
- scattering direction |
24 |
- russian roulette. |
25 |
|
26 |
Each photon map also has a local state randState used for distribRatio |
27 |
during distribution and for bias compensation during gathering. |
28 |
|
29 |
The random seed randSeed can added to each initial state with pmapSeed() |
30 |
so the RNGs can be externally seeded if necessary. |
31 |
*/ |
32 |
|
33 |
unsigned short partState [3] = {47717, 5519, 21521}, |
34 |
emitState [3] = {33997, 59693, 11003}, |
35 |
cntState [3] = {17077, 4111, 48907}, |
36 |
mediumState [3] = {25247, 7507, 33797}, |
37 |
scatterState [3] = {21863, 45191, 5099}, |
38 |
rouletteState [3] = {10243, 39829, 9433}, |
39 |
randSeed = 0; |