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

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 2.74 by greg, Fri Oct 14 19:15:34 2016 UTC vs.
Revision 2.76 by greg, Thu Jan 26 16:46:58 2017 UTC

# Line 60 | Line 60 | ambcollision(                          /* proposed direciton collides? */
60   {
61          double  cos_thresh;
62          int     ii, jj;
63 <                                        /* min. spacing = 1/10th division */
64 <        cos_thresh = (PI/10.)/(double)hp->ns;
63 >                                        /* min. spacing = 1/4th division */
64 >        cos_thresh = (PI/4.)/(double)hp->ns;
65          cos_thresh = 1. - .5*cos_thresh*cos_thresh;
66                                          /* check existing neighbors */
67          for (ii = i-1; ii <= i+1; ii++) {
# Line 126 | Line 126 | resample:
126                                          /* avoid coincident samples */
127          if (!n && ambcollision(hp, i, j, ar.rdir)) {
128                  spt[0] = frandom(); spt[1] = frandom();
129 <                goto resample;
129 >                goto resample;          /* reject this sample */
130          }
131          dimlist[ndims++] = AI(hp,i,j) + 90171;
132          rayvalue(&ar);                  /* evaluate ray */
# Line 137 | Line 137 | resample:
137          if (ar.rt*ap->d < 1.0)          /* new/closer distance? */
138                  ap->d = 1.0/ar.rt;
139          if (!n) {                       /* record first vertex & value */
140 <                if (ar.rt > 10.0*thescene.cusize)
141 <                        ar.rt = 10.0*thescene.cusize;
140 >                if (ar.rt > 10.0*thescene.cusize + 1000.)
141 >                        ar.rt = 10.0*thescene.cusize + 1000.;
142                  VSUM(ap->p, ar.rorg, ar.rdir, ar.rt);
143                  copycolor(ap->v, ar.rcol);
144          } else {                        /* else update recorded value */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines