99 |
|
t2 = DOT(rdirscan(py)[px], |
100 |
|
rdirscan(y)[x]); |
101 |
|
if (t2 <= FTINY) continue; |
102 |
+ |
/* use approximation instead |
103 |
|
t2 = acos(t2); |
104 |
|
t2 = 1./(t2*t2); |
105 |
+ |
*/ |
106 |
+ |
t2 = .5 / (1. - t2); |
107 |
|
copycolor(ctmp, fovscan(y)[x]); |
108 |
|
scalecolor(ctmp, t2); |
109 |
|
addcolor(vsum, ctmp); |
358 |
|
} |
359 |
|
fcross(cp, diffx, diffy); |
360 |
|
omega = 0.5 * sqrt(DOT(cp,cp)); |
361 |
< |
tsampr(x,y) = PI/180. / sqrt(omega) / |
362 |
< |
hacuity(plum(fovscan(y)[x])); |
363 |
< |
if (tsampr(x,y) > maxsr) |
361 |
> |
if (omega <= FTINY) |
362 |
> |
tsampr(x,y) = 1.; |
363 |
> |
else if ((tsampr(x,y) = PI/180. / sqrt(omega) / |
364 |
> |
hacuity(plum(fovscan(y)[x]))) > maxsr) |
365 |
|
maxsr = tsampr(x,y); |
366 |
|
} |
367 |
|
/* copy perimeter (easier) */ |