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

Comparing ray/src/rt/srcsamp.c (file contents):
Revision 1.1 by greg, Mon Oct 21 12:57:13 1991 UTC vs.
Revision 1.3 by greg, Tue Oct 22 11:23:55 1991 UTC

# Line 88 | Line 88 | tryagain:
88          if (source[si->sn].sflags & SFLAT) {
89                  si->dom *= sflatform(si->sn, dir);
90                  if (si->dom <= FTINY) {         /* behind source */
91 <                        si->sp = si->np;
91 >                        si->np = 0;
92                          goto tryagain;
93                  }
94                  si->dom *= (double)(size[SU]*size[SV])/(MAXSPART*MAXSPART);
# Line 158 | Line 158 | FVECT  ro;
158                                          /* first check point location */
159          clrpart(si->spt);
160          sp = &source[si->sn];
161 <        rad2 = 1.273 * DOT(sp->ss[SV],sp->ss[SV]);
161 >        rad2 = 1.365 * DOT(sp->ss[SV],sp->ss[SV]);
162          v[0] = ro[0] - sp->sloc[0];
163          v[1] = ro[1] - sp->sloc[1];
164          v[2] = ro[2] - sp->sloc[2];
# Line 212 | Line 212 | double  d2;
212          newct[0] = cent[0] - newax[0];
213          newct[1] = cent[1] - newax[1];
214          newct[2] = cent[2] - newax[2];
215 <        npl = cyl_partit(ro, pt, pi, mp*3/4, newct, newax, d2);
215 >        npl = cyl_partit(ro, pt, pi, mp/2, newct, newax, d2);
216                                          /* upper half */
217          newct[0] = cent[0] + newax[0];
218          newct[1] = cent[1] + newax[1];
219          newct[2] = cent[2] + newax[2];
220 <        npu = cyl_partit(ro, pt, pi, mp-npl, newct, newax, d2);
220 >        npu = cyl_partit(ro, pt, pi, mp/2, newct, newax, d2);
221                                          /* return total */
222          return(npl + npu);
223   }
# Line 282 | Line 282 | double  du2, dv2;
282          newct[0] = cent[0] - newax[0];
283          newct[1] = cent[1] - newax[1];
284          newct[2] = cent[2] - newax[2];
285 <        npl = flt_partit(ro, pt, pi, mp*3/4, newct, u, v, du2, dv2);
285 >        npl = flt_partit(ro, pt, pi, mp/2, newct, u, v, du2, dv2);
286                                          /* upper half */
287          newct[0] = cent[0] + newax[0];
288          newct[1] = cent[1] + newax[1];
289          newct[2] = cent[2] + newax[2];
290 <        npu = flt_partit(ro, pt, pi, mp-npl, newct, u, v, du2, dv2);
290 >        npu = flt_partit(ro, pt, pi, mp/2, newct, u, v, du2, dv2);
291                                  /* return total */
292          return(npl + npu);
293   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines