| 121 |
|
dimlist[ndims++] = i*hp->ns + j + 90171; |
| 122 |
|
rayvalue(&ar); /* evaluate ray */ |
| 123 |
|
ndims--; |
| 124 |
< |
if (ar.rt > 20.0*maxarad) /* limit vertex distance */ |
| 125 |
< |
ar.rt = 20.0*maxarad; |
| 124 |
> |
/* limit vertex distance */ |
| 125 |
> |
if (ar.rt > 10.0*thescene.cusize) |
| 126 |
> |
ar.rt = 10.0*thescene.cusize; |
| 127 |
|
else if (ar.rt <= FTINY) /* should never happen! */ |
| 128 |
|
goto badsample; |
| 129 |
|
VSUM(ap->p, ar.rorg, ar.rdir, ar.rt); |
| 558 |
|
ra[1] = minarad; |
| 559 |
|
/* cap gradient if necessary */ |
| 560 |
|
if (pg != NULL) { |
| 561 |
< |
d = (pg[0]*pg[0] + pg[1]*pg[1])*ra[0]*ra[0]; |
| 561 |
> |
d = pg[0]*pg[0]*ra[0]*ra[0] + |
| 562 |
> |
pg[1]*pg[1]*ra[1]*ra[1]; |
| 563 |
|
if (d > 1.0) { |
| 564 |
|
d = 1.0/sqrt(d); |
| 565 |
|
pg[0] *= d; |