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 1.1 by greg, Thu Feb 2 10:49:26 1989 UTC vs.
Revision 1.2 by greg, Wed Jun 5 12:15:34 1991 UTC

# Line 105 | Line 105 | int  c, r;
105  
106          wsum = FTINY;
107          setcolor(csum, 0.0, 0.0, 0.0);
108 <        for (y = ycent+1-yrad; y <= ycent+yrad; y++) {
108 >        for (y = ycent-yrad; y <= ycent+yrad; y++) {
109                  if (y < 0 || y >= yres)
110                          continue;
111 <                dy = (y_r*y - r)/rad;
111 >                dy = (y_r*(y+.5) - (r+.5))/rad;
112                  scan = scanin[y%barsize];
113 <                for (x = xcent+1-xrad; x <= xcent+xrad; x++) {
113 >                for (x = xcent-xrad; x <= xcent+xrad; x++) {
114                          if (x < 0 || x >= xres)
115                                  continue;
116 <                        dx = (x_c*x - c)/rad;
116 >                        dx = (x_c*(x+.5) - (c+.5))/rad;
117                          weight = lookexp(-(dx*dx + dy*dy));
118                          wsum += weight;
119                          copycolor(ctmp, scan[x]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines