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