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

Comparing ray/src/gen/mksource.c (file contents):
Revision 2.1 by greg, Tue Apr 12 03:30:43 2005 UTC vs.
Revision 2.3 by schorsch, Mon Sep 19 12:32:12 2005 UTC

# Line 7 | Line 7 | static const char RCSid[] = "$Id$";
7  
8   #include "ray.h"
9   #include "random.h"
10 + #include "resolu.h"
11  
12   #define NTRUNKBR        4               /* number of branches at trunk */
13   #define NTRUNKVERT      4               /* number of vertices at trunk */
# Line 207 | Line 208 | geosample(int nsamps)
208          return(tree);
209   memerr:
210          error(SYSTEM, "out of memory in geosample()");
211 +        return NULL; /* dummy return */
212   }
213  
214   /* Compute leaf exponent histogram */
# Line 234 | Line 236 | get_threshold(const TRITREE *tree)
236          memset((void *)exphisto, 0, sizeof(exphisto));
237          for (i = 0; i < NTRUNKBR; i++)
238                  get_ehisto(&tree->kid[i], exphisto);
239 <                                                /* use 99th percentile */
239 >                                                /* use 98th percentile */
240          for (i = 0; i < 256; i++)
241                  samptotal += exphisto[i];
242 <        samptotal /= 100;
242 >        samptotal /= 50;
243          for (i = 256; (--i > 0) & (samptotal > 0); )
244                  samptotal -= exphisto[i];
245          return(ldexp(.75, i-COLXS));
# Line 385 | Line 387 | mksources(TRITREE *samptree, double thresh, double max
387          LOSTLIGHT       *lostlightlist = NULL;
388          int             emax;
389          TRITREE         *startleaf;
388        COLOR           cval;
390          double          growstep;
391          FVECT           curcent;
392          double          currad;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines