ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapdump.c
(Generate patch)

Comparing ray/src/rt/pmapdump.c (file contents):
Revision 2.1 by greg, Tue Feb 24 19:39:27 2015 UTC vs.
Revision 2.3 by rschregle, Fri May 8 13:20:23 2015 UTC

# Line 1 | Line 1
1   /*
2 <   ===============================================================  
2 >   ==================================================================
3     Dump photon maps as RADIANCE scene description to stdout
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  
7 >   (c) Lucerne University of Applied Sciences and Arts,
8 >   supported by the Swiss National Science Foundation (SNSF, #147053)
9     ==================================================================
10    
11     $Id$
# Line 18 | Line 19
19   #include "rtio.h"
20   #include "resolu.h"
21   #include "random.h"
22 + #include "math.h"
23  
24  
25   /* Defaults */
# Line 166 | Line 168 | int main (int argc, char** argv)
168           (= sphere distrib density ^-1/3) */
169        vol = (maxPos [0] - minPos [0]) * (maxPos [1] - minPos [1]) *
170              (maxPos [2] - minPos [2]);
171 <      rad = radScale * RADCOEFF * cbrt(vol / numSpheres);
171 >      rad = radScale * RADCOEFF * pow(vol / numSpheres, 1./3.);
172        
173        /* Photon dump probability to satisfy target sphere count */
174        dumpRatio = numSpheres < numPhotons ? (float)numSpheres / numPhotons

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines