|
|
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c792e92@news.povray.org...
> Btw, I wonder if this kind of macro could be worth including in the
> standard include files.
>
> The only concern I have about it is that it uses the "trick" to
calculate
> the normal of the spline with the Spline(T+Epsilon)-Spline(T-Epsilon)
> formula. What I'm not sure about is the value for 'Epsilon'. I used 1e-5,
> but that might sometimes be either too big or too small (due to floating
> point number inaccuracies).
I remember from my Numerical Analysis courses, that some authors recommend
the optimal size for the epsilon as sqrt(EPS) where EPS is the distance from
1.0 to the next largest floating point number. In a traditional PC, I
believe EPS is approx 2.2e-16, so the optimal epsilon is approximately
1.4e-8
However, I'm recalling all this from my memory, so I can't guarantee that it
is correct :)
I hope you can make some tests for this and report your results...
Fernando.
Post a reply to this message
|
|