63 |
|
static double |
64 |
|
est_DSFrad(const RBFNODE *rbf, const FVECT outvec) |
65 |
|
{ |
66 |
< |
const double rad_epsilon = 0.03; |
66 |
> |
const double rad_epsilon = 0.01; |
67 |
|
const double DSFtarget = 0.60653066 * eval_rbfrep(rbf,outvec) * |
68 |
|
COSF(outvec[2]); |
69 |
|
double inside_rad = rad_epsilon; |
76 |
|
do { |
77 |
|
double test_rad = interp_rad; |
78 |
|
double DSFtest; |
79 |
< |
if (test_rad >= outside_rad) |
80 |
< |
return(test_rad); |
81 |
< |
if (test_rad <= inside_rad) |
82 |
< |
return(test_rad*(test_rad>0)); |
79 |
> |
if ((test_rad >= outside_rad) | (test_rad <= inside_rad)) |
80 |
> |
test_rad = .5*(inside_rad + outside_rad); |
81 |
|
DSFtest = eval_DSFsurround(rbf, outvec, test_rad); |
82 |
|
if (DSFtest > DSFtarget) { |
83 |
|
inside_rad = test_rad; |
86 |
|
outside_rad = test_rad; |
87 |
|
DSFoutside = DSFtest; |
88 |
|
} |
91 |
– |
if (DSFoutside >= DSFinside) |
92 |
– |
return(test_rad); |
89 |
|
} while (outside_rad-inside_rad > rad_epsilon); |
90 |
< |
return(interp_rad); |
90 |
> |
|
91 |
> |
return(.5*(inside_rad + outside_rad)); |
92 |
|
#undef interp_rad |
93 |
|
} |
94 |
|
|
488 |
|
default: |
489 |
|
return; /* else we can interpolate */ |
490 |
|
} |
491 |
< |
for (rbf = near_rbf->next; rbf != NULL; rbf = rbf->next) { |
491 |
> |
for (rbf = dsf_list; rbf != NULL; rbf = rbf->next) { |
492 |
|
const double d = input_orient*rbf->invec[2]; |
493 |
|
if (d >= 1.-2.*FTINY) |
494 |
|
return; /* seems we have normal */ |