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.4 by greg, Tue Aug 18 18:45:55 2015 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5 <   ===============================================================  
5 >   ==================================================================
6     Dump photon maps as RADIANCE scene description to stdout
7  
8     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
9     (c) Fraunhofer Institute for Solar Energy Systems,
10 <       Lucerne University of Applied Sciences & Arts  
10 >   (c) Lucerne University of Applied Sciences and Arts,
11 >   supported by the Swiss National Science Foundation (SNSF, #147053)
12     ==================================================================
13    
14     $Id$
# Line 18 | Line 22
22   #include "rtio.h"
23   #include "resolu.h"
24   #include "random.h"
25 + #include "math.h"
26  
27  
28   /* Defaults */
# Line 166 | Line 171 | int main (int argc, char** argv)
171           (= sphere distrib density ^-1/3) */
172        vol = (maxPos [0] - minPos [0]) * (maxPos [1] - minPos [1]) *
173              (maxPos [2] - minPos [2]);
174 <      rad = radScale * RADCOEFF * cbrt(vol / numSpheres);
174 >      rad = radScale * RADCOEFF * pow(vol / numSpheres, 1./3.);
175        
176        /* Photon dump probability to satisfy target sphere count */
177        dumpRatio = numSpheres < numPhotons ? (float)numSpheres / numPhotons

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines