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.3 by greg, Mon Mar 18 15:06:30 1991 UTC vs.
Revision 1.9 by greg, Wed Mar 20 13:47:38 1991 UTC

# Line 6 | Line 6
6   * Common data structures for glare source finding routines
7   */
8  
9 + #define DEBUG 1
10 +
11   #include "standard.h"
12   #include "view.h"
13   #include "color.h"
# Line 13 | Line 15
15  
16   #define GLAREBR         10.0            /* glare source is this * avg. lum. */
17  
18 < #define SAMPDENS        50              /* samples per unit in image */
18 > #define SAMPDENS        50              /* default samples per unit in image */
19   #define TSAMPSTEP       10              /* sample step to compute threshold */
20  
21   #define SEPS            2               /* sources this close ==> contig. */
22  
23 + #define SAMIN           .005            /* minimum solid angle for source */
24 + #define MAXBUDDY        (4.*sqrt(SAMIN/PI))     /* max separation for pairing */
25 +
26 + #define TOOSMALL(s)     ((s)->brt*(s)->dom < threshold*SAMIN)
27 +
28   extern VIEW     ourview;                /* our view */
29   extern VIEW     pictview;               /* picture view */
30   extern VIEW     leftview, rightview;    /* leftmost and rightmost views */
# Line 25 | Line 32 | extern VIEW    leftview, rightview;    /* leftmost and right
32   extern int      verbose;                /* verbose reporting */
33   extern char     *progname;              /* global argv[0] */
34  
35 + extern double   threshold;              /* threshold value for glare sources */
36 +
37 + extern int      sampdens;               /* sample density */
38   extern ANGLE    glarang[];              /* glare calculation angles */
39   extern int      nglarangs;
40   extern double   maxtheta;               /* maximum glare angle (in radians) */
# Line 32 | Line 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
46 < #define h_theta(h)      ((double)(h)/-(double)SAMPDENS)
45 > #define vsize           (sampdens-1)
46 > #define h_theta(h)      (-(double)(h)/(double)sampdens)
47  
48   extern struct illum {
49          float   theta;          /* glare direction */
# Line 52 | Line 62 | struct srcspan {
62  
63   extern struct source {
64          FVECT   dir;            /* source direction */
65 <        float   dom;            /* solid angle of source */
66 <        float   brt;            /* average source brightness */
65 >        double  dom;            /* solid angle of source */
66 >        double  brt;            /* average source brightness */
67          struct srcspan  *first; /* first span for this source */
68          struct source   *next;  /* next source in list */
69   } *donelist;                    /* finished sources */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines