1 |
#ifndef lint |
2 |
static const char RCSid[] = "$Id: pmaprand.c,v 2.3 2015/08/18 18:45:55 greg 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.2 2015/05/08 13:20:23 rschregle Exp $ |
16 |
*/ |
17 |
|
18 |
|
19 |
|
20 |
/* |
21 |
Separate RNG states are used for the following variates during photon |
22 |
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 |
Each photon map also has a local state randState used for distribRatio |
32 |
during distribution and for bias compensation during gathering. |
33 |
|
34 |
The random seed randSeed can added to each initial state with pmapSeed() |
35 |
so the RNGs can be externally seeded if necessary. |
36 |
*/ |
37 |
|
38 |
unsigned short partState [3] = {47717, 5519, 21521}, |
39 |
emitState [3] = {33997, 59693, 11003}, |
40 |
cntState [3] = {17077, 4111, 48907}, |
41 |
mediumState [3] = {25247, 7507, 33797}, |
42 |
scatterState [3] = {21863, 45191, 5099}, |
43 |
rouletteState [3] = {10243, 39829, 9433}, |
44 |
randSeed = 0; |