POV-Ray : Newsgroups : povray.binaries.images : Is there a spline solution out there? : Re: Is there a spline solution out there? Server Time
1 Oct 2024 22:25:10 EDT (-0400)
  Re: Is there a spline solution out there?  
From: Chris Colefax
Date: 12 Aug 2000 00:41:59
Message: <3994d597@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
> I want a smoothly varying function that goes between the following
> points:
[snipped point list]
> The function/ spline will serve as a keyframing notation for the joints
> in a body, ala < timei , thetai >. Such that if I call out 0.375 for the
> x, I should get something not too far from 117.
>
> My own "cosinespline" is inadequate (see 04/14/00 posting) :  not much
> better than straight lines.  Chris Colefax's macro has a ton of options
> which offer some promise, but it is woefully lacking an adequate
> explanation of what he dreamed up. I'm suspecting it cannot even handle
> an irregular list like above.

Apologies for the current lack of documentation for the Spline macro!
Although it can handle splines of 2D vectors, it's not designed for values
in the form you have (i.e. <time, value>).  The ability to specify times
with spline values was a feature I had coded into an earlier version, but I
removed it in the name of simplicity (the macro file is complicated enough
as it stands!).

As an alternative, I might suggest the Automatic Clock Modifier, used with
the S-Curve clock type, e.g.:

   #include "autoclck.mcr"
   rotate From (0, -15) Using ("S", 1, 1, "") To (0.25, -125) To
(0.45, -110) ...

Of course, you could use other clock types to suit your purposes (e.g. if
you wanted the rotation to accelerate from one point to another, or
deccelerate, etc.).  If this doesn't produce what you're after, and you
still want to try the Spline macro, feel free to ask any questions you think
I might be able to answer...!


Post a reply to this message

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