ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmaprand.c
Revision: 2.2
Committed: Fri May 8 13:20:23 2015 UTC (9 years ago) by rschregle
Content type: text/plain
Branch: MAIN
Changes since 2.1: +3 -2 lines
Log Message:
Double-counting bugfix for glow sources (thanks DGM!), revised copyright

File Contents

# User Rev Content
1 greg 2.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 rschregle 2.2 (c) Lucerne University of Applied Sciences and Arts,
8     supported by the Swiss National Science Foundation (SNSF, #147053)
9 greg 2.1 ==================================================================
10    
11 rschregle 2.2 $Id: pmaprand.c,v 2.1 2015/02/24 19:39:27 greg Exp $
12 greg 2.1 */
13    
14    
15    
16     /*
17     Separate RNG states are used for the following variates during photon
18     distribution:
19    
20     - source partition
21     - emission direction
22     - emission counter fraction
23     - mean free distance in medium
24     - scattering direction
25     - russian roulette.
26    
27     Each photon map also has a local state randState used for distribRatio
28     during distribution and for bias compensation during gathering.
29    
30     The random seed randSeed can added to each initial state with pmapSeed()
31     so the RNGs can be externally seeded if necessary.
32     */
33    
34     unsigned short partState [3] = {47717, 5519, 21521},
35     emitState [3] = {33997, 59693, 11003},
36     cntState [3] = {17077, 4111, 48907},
37     mediumState [3] = {25247, 7507, 33797},
38     scatterState [3] = {21863, 45191, 5099},
39     rouletteState [3] = {10243, 39829, 9433},
40     randSeed = 0;