--- ray/src/rt/srcsamp.c 1991/10/21 12:57:13 1.1 +++ ray/src/rt/srcsamp.c 1991/10/22 11:23:55 1.3 @@ -88,7 +88,7 @@ tryagain: if (source[si->sn].sflags & SFLAT) { si->dom *= sflatform(si->sn, dir); if (si->dom <= FTINY) { /* behind source */ - si->sp = si->np; + si->np = 0; goto tryagain; } si->dom *= (double)(size[SU]*size[SV])/(MAXSPART*MAXSPART); @@ -158,7 +158,7 @@ FVECT ro; /* first check point location */ clrpart(si->spt); sp = &source[si->sn]; - rad2 = 1.273 * DOT(sp->ss[SV],sp->ss[SV]); + rad2 = 1.365 * DOT(sp->ss[SV],sp->ss[SV]); v[0] = ro[0] - sp->sloc[0]; v[1] = ro[1] - sp->sloc[1]; v[2] = ro[2] - sp->sloc[2]; @@ -212,12 +212,12 @@ double d2; newct[0] = cent[0] - newax[0]; newct[1] = cent[1] - newax[1]; newct[2] = cent[2] - newax[2]; - npl = cyl_partit(ro, pt, pi, mp*3/4, newct, newax, d2); + npl = cyl_partit(ro, pt, pi, mp/2, newct, newax, d2); /* upper half */ newct[0] = cent[0] + newax[0]; newct[1] = cent[1] + newax[1]; newct[2] = cent[2] + newax[2]; - npu = cyl_partit(ro, pt, pi, mp-npl, newct, newax, d2); + npu = cyl_partit(ro, pt, pi, mp/2, newct, newax, d2); /* return total */ return(npl + npu); } @@ -282,12 +282,12 @@ double du2, dv2; newct[0] = cent[0] - newax[0]; newct[1] = cent[1] - newax[1]; newct[2] = cent[2] - newax[2]; - npl = flt_partit(ro, pt, pi, mp*3/4, newct, u, v, du2, dv2); + npl = flt_partit(ro, pt, pi, mp/2, newct, u, v, du2, dv2); /* upper half */ newct[0] = cent[0] + newax[0]; newct[1] = cent[1] + newax[1]; newct[2] = cent[2] + newax[2]; - npu = flt_partit(ro, pt, pi, mp-npl, newct, u, v, du2, dv2); + npu = flt_partit(ro, pt, pi, mp/2, newct, u, v, du2, dv2); /* return total */ return(npl + npu); }