ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/glare.h
(Generate patch)

Comparing ray/src/util/glare.h (file contents):
Revision 1.11 by greg, Thu Mar 28 16:27:23 1991 UTC vs.
Revision 2.2 by greg, Tue May 25 14:54:05 1993 UTC

# Line 6 | Line 6
6   * Common data structures for glare source finding routines
7   */
8  
9 #define DEBUG 1
10
9   #include "standard.h"
10   #include "view.h"
11   #include "color.h"
12   #include "setscan.h"
13  
14 < #define GLAREBR         10.0            /* glare source is this * avg. lum. */
14 > #define GLAREBR         7.0             /* glare source is this * avg. lum. */
15  
16 < #define SAMPDENS        50              /* default samples per unit in image */
16 > #define SAMPDENS        75              /* default samples per unit in image */
17   #define TSAMPSTEP       10              /* sample step to compute threshold */
18  
19 < #define SEPS            2               /* sources this close ==> contig. */
19 > #define SEPS            1               /* sources this close ==> contig. */
20  
21   #define SAMIN           .005            /* minimum solid angle for source */
22   #define MAXBUDDY        (4.*sqrt(SAMIN/PI))     /* max separation for pairing */
23  
24   #define TOOSMALL(s)     ((s)->brt*(s)->dom < threshold*SAMIN)
25  
26 + #define SABIG           .025            /* solid angle of splittable source */
27 + #define LCORR           .12             /* linearity of splittable source */
28 +
29   extern VIEW     ourview;                /* our view */
30   extern VIEW     pictview;               /* picture view */
31   extern VIEW     leftview, rightview;    /* leftmost and rightmost views */
# Line 39 | Line 40 | extern ANGLE   glarang[];              /* glare calculation angles *
40   extern int      nglarangs;
41   extern double   maxtheta;               /* maximum glare angle (in radians) */
42   extern int      hsize;                  /* horizontal size */
42 extern int      hlim;                   /* horizontal limit of central view */
43  
44   #define nglardirs       (2*nglarangs+1)
45   #define vsize           (sampdens-1)
46 < #define h_theta(h)      (-(double)(h)/(double)sampdens)
46 > #define hscale(v)       sqrt((double)(sampdens*sampdens - (v)*(v)))
47 > #define hlim(v)         (int)(maxtheta*hscale(v))
48 > #define h_theta(h,v)    (-(h)/hscale(v))
49  
50   extern struct illum {
51          float   theta;          /* glare direction */
# Line 69 | Line 71 | extern struct source {
71   } *donelist;                    /* finished sources */
72  
73   extern double   getviewpix();
74 + extern double   pixsize();
75  
76   extern long     npixinvw;       /* number of samples in view */
77   extern long     npixmiss;       /* number of samples missing */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines