POV-Ray : Newsgroups : povray.general : How to get spline tangent : Re: How to get spline tangent Server Time
19 Nov 2024 13:40:10 EST (-0500)
  Re: How to get spline tangent  
From: Grey Knight
Date: 21 Feb 2002 13:37:58
Message: <3C753E7B.A78CC2@namtar.qub.ac.uk>
I'm gonna reply to all your posts in one go, since you were carrying on
such a little conversation with yourself ;)

Warp wrote:
> Beware of possible floating point inaccuracies with such small numbers.
This is why your method is better (because the tangential vector is
longer :. less scope for FPI)

Warp wrote:
>   Of course the more mathematically oriented people would like an exact
> result instead of just an approximation... :)
Well, the only limit on the accuracy is that imposed by the system
itself (specifically FPI as you pointed out), so a more accurate
solution would probably have no further benefit anyway?

Warp wrote:
>   By the way, I think that this gives a better approximation:
Yeah, it does.

>   Suppose that we want to calculate the tangent of the spline at the
> time value T.
Which we do. ;P

>   Take a small value, which we will call Epsilon (could be for example
> 10e-5 or something similar).
> My constants.inc has EPSILON=1e-7, but of course it doesn't matter so long as it's
small.
> 
>   This given a better approximation because the resulting vector will be
> closer to the true tangent, and could even be exactly the tangent.
> 'Spline(T+Epsilon)-Spline(T)', however, can never be exactly the tangent.
Yeah, this method *is* better. I think the only reason I thought of the
other one was because the pure mathematical definition of the tangent
comes from that (with EPSILON -> 0), which makes the maths easier.
Of course, we can't use EPSILON=0 here, so obviously your method works
better.

-- 
signature{
  "Grey Knight" contact{ email "gre### [at] yahoocom" }
  site_of_week{ url "http://digilander.iol.it/jrgpov" }
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.