| 78 |
|
hlist[1] = j; |
| 79 |
|
hlist[2] = i; |
| 80 |
|
multisamp(spt, 2, urand(ilhash(hlist,3)+n)); |
| 81 |
< |
if (!n) { /* avoid border samples for n==0 */ |
| 81 |
> |
/* avoid coincident samples */ |
| 82 |
> |
if (!n && (0 < i) & (i < hp->ns-1) && |
| 83 |
> |
(0 < j) & (j < hp->ns-1)) { |
| 84 |
|
if ((spt[0] < 0.1) | (spt[0] >= 0.9)) |
| 85 |
|
spt[0] = 0.1 + 0.8*frandom(); |
| 86 |
|
if ((spt[1] < 0.1) | (spt[1] >= 0.9)) |
| 219 |
|
wt > (d = 0.8*intens(rcol)*r->rweight/(ambdiv*minweight))) |
| 220 |
|
wt = d; /* avoid ray termination */ |
| 221 |
|
n = sqrt(ambdiv * wt) + 0.5; |
| 222 |
< |
i = 1 + 5*(ambacc > FTINY); /* minimum number of samples */ |
| 222 |
> |
i = 1 + 8*(ambacc > FTINY); /* minimum number of samples */ |
| 223 |
|
if (n < i) |
| 224 |
|
n = i; |
| 225 |
|
/* allocate sampling array */ |
| 695 |
|
return(0); |
| 696 |
|
|
| 697 |
|
if ((ra == NULL) & (pg == NULL) & (dg == NULL) || |
| 698 |
< |
(hp->sampOK < 0) | (hp->ns < 4)) { |
| 698 |
> |
(hp->sampOK < 0) | (hp->ns < 9)) { |
| 699 |
|
free(hp); /* Hessian not requested/possible */ |
| 700 |
|
return(-1); /* value-only return value */ |
| 701 |
|
} |