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

Comparing ray/src/px/pf3.c (file contents):
Revision 2.5 by greg, Fri Jun 18 13:36:20 1993 UTC vs.
Revision 2.6 by greg, Wed Jun 23 12:17:09 1993 UTC

# Line 40 | Line 40 | extern char  *progname;
40  
41   float  *gausstable;             /* gauss lookup table */
42  
43 < #define  lookgauss(x)           gausstable[(int)(-10.*(x)+.5)]
43 > #define  lookgauss(x)           gausstable[(int)(10.*(x)+.5)]
44  
45  
46   initmask()                      /* initialize gaussian lookup table */
# Line 67 | Line 67 | COLOR  csum;
67   int  xcent, ycent;
68   int  c, r;
69   {
70 <        static int  wsum;
71 <        static double  d;
72 <        static int  y;
70 >        int  wsum;
71 >        double  d;
72 >        int  y;
73          register int  x;
74          register COLOR  *scan;
75  
# Line 102 | Line 102 | COLOR  csum;
102   int  xcent, ycent;
103   int  c, r;
104   {
105 <        static double  dy, dx, weight, wsum;
106 <        static COLOR  ctmp;
107 <        static int  y;
105 >        double  dy, dx, weight, wsum;
106 >        COLOR  ctmp;
107 >        int  y;
108          register int  x;
109          register COLOR  *scan;
110  
# Line 119 | Line 119 | int  c, r;
119                          if (x < 0) continue;
120                          if (x >= xres) break;
121                          dx = (x_c*(x+.5) - (c+.5))/rad;
122 <                        weight = lookgauss(-(dx*dx + dy*dy));
122 >                        weight = lookgauss(dx*dx + dy*dy);
123                          wsum += weight;
124                          copycolor(ctmp, scan[x]);
125                          scalecolor(ctmp, weight);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines