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:37:03 EDT (-0400)
  Re: subtle behavior of Spline_Trans() macro in transforms.inc  
From: clipka
Date: 20 Apr 2009 18:15:00
Message: <web.49ecf2b1987a083f305d384e0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> I've been waiting for the smoke to clear on the battlefield... :-P

Hm, I think it has cleared now... mainly :}

> Yes, completely understood. (It's been ...*awhile*...since I took a calculus
> course, and I'm certainly NO expert.) I guess, in the context of the math
> discussions here, what I'm looking for IS finding the 'limit' at
> delta-*something* = 0. But I see the difficulties (I think!)
> >
> > As you will see, although this is an exact mathematical definition, it doesn't
> > work with d = 0 because you'd get 0/0, which is nonsense.
>
> That piques my curiosity. I thought calculus was the 'prime tool' for getting
> that exact tangent. So, do I understand that POV-Ray can't actually calculate
> that?  (Sorry if my ignornace is showing.)

It could - as Warp has pointed out quite correctly - if someone programmed it
with the correct precise formula.

The catch here, however, is that this would also require feeding that formula
with all the control point parameters that normally go into the spline
definition already. Unfortunately it's not possible to access that information
via SDL from an arbitrary spline, so you'd have to remember this information
and "manually" feed it into a suitable macro (or function, for that matter).

> 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.)  Silly, I know. Even stupid! :-O  And
> not even good coding practice, I would assume.

Indeed, it would deprive the user of choosing for himself how close to zero to
go.

So if you want to go for a "standard almost-zero", the proper way would be to
write a similar macro without that parameter, which would then use a fixed
value.

However, I can also imagine that such a "tweaking screw" can come in handy
occasionally when the results are a bit weird. Maybe some spline taking an
unconventionally sharp turn. It can also serve to smoothen out the transitions
in linear splines a bit, by deliberately setting it somewhat larger than zero.

So all in all, I think the parameter is there for good - provided that you heed
the advice to choose a value not *exactly* zero ;)


Post a reply to this message

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