POV-Ray : Newsgroups : povray.advanced-users : subtle behavior of Spline_Trans() macro in transforms.inc : Re: subtle behavior of Spline_Trans() macro in transforms.inc Server Time
5 Jul 2024 13:45:48 EDT (-0400)
  Re: subtle behavior of Spline_Trans() macro in transforms.inc  
From: Kenneth
Date: 20 Apr 2009 23:20:01
Message: <web.49ed3a08987a083ff50167bc0@news.povray.org>
> "Kenneth" <kdw### [at] earthlinknet> wrote:
>
> > But more prosaically, my original question--a rather naive one, as I see
> > now--was really about the *idea* of being able to set Foresight to zero. As
> > a way for the macro to 'make better sense' to the user. Of course, I do now
> > see the practical difficulties involved.  (Here's a REALLY goofball idea:
> > Maybe, 'behind the scenes' in the macro, there could be a little 'hidden'
> > addition of .001 or something, so that when Foresight IS set to zero, the
> > equations will still have a little number to work with.) A silly idea...


"clipka" <nomail@nomail> wrote:
> Indeed, it would deprive the user of choosing for himself how close to zero to
> go.
>

And Warp wrote (taken out of context)...
> Two points on the spline gives you an approximation of the direction of
> the spline (which is what is used here). The closer the points are to each
> other, the more accurate the direction will be. Of course one could hastily
> think that you should then use something like 1e-100 as the distance between
> the two points to get a very very very accurate direction. However, the
> drawback of using two points which are too close to each other is that you
> start losing accuracy (due to the limited size of floating point numbers).
> Thus using a distance of 1e-100 is not a good idea, as you will most probably
> get a larger error than with eg. a distance of 1e-10.

That's the only 'real' trouble with the macro (actually more of a mystery than a
problem): how small to make Foresight to get 'bleeding edge' alignment accuracy,
without going so low as to cause the equations to flip the object 90-deg. (I
haven't yet done any tests to see what that value might be.) No mention of it
in the docs, unfortunately. I'm sure there's *some* kind of formula for
determining that--probably based on the 'limited size of floating point
numbers.' But in a practical sense--from the user's standpoint--it would be
useful if the docs actually stated such a lower-limit value, whatever it is.
That would keep any 'surprises' at bay. (Or--egads!--does the value depend on
other parameters like spline type?)

KW


Post a reply to this message

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