POV-Ray : Newsgroups : povray.general : Colefax spline head banger : Re: Colefax spline head banger Server Time
11 Jun 2024 08:10:15 EDT (-0400)
  Re: Colefax spline head banger  
From: clipka
Date: 1 Dec 2015 06:20:00
Message: <web.565d81adfe0ad53cad6fa18f0@news.povray.org>
Dick Balaska <dic### [at] buckosoftcom> wrote:
> I have been using the Colefax spline macro for decades.
> I have a new animation spline that gives unexpected results and I can't
> figure out why. (see below)
> As I walk through the spline clock, this one iteration reverses
> direction 180 degrees and moves back towards the origin. Then it
> reverses direction again and continues normally, but the damage is done.
> By tweaking the spline points, and the loop increment, I can move the
> reversed frame (currently #4 in the code below) but I can't get rid of
> it.  Help?

The type of spline used is a bitch, and does things like that.

This type of spline is designed to make as smooth a curve, with as smooth an
acceleration, as possible, while going through the specified points. It will
resist any attempt to force it into jerky movements, and instead prefer to swing
back and forth at any point where you try to do that.

Moving the 2nd point a bit towards the starting point and moving the 4th point a
good deal away should help you solve the issue, but it might not be the
trajectory you want.

Also note that it won't help you to add more control points: The more you try to
pin down the spline to some desired trajectory, the more likely it will exhibit
noticeable swings.

I'd personally recommend using a different spline type, one that does not go
through the control points but rather touches the lines between adjacent control
points tangentially; those are much less prone to undesired swings.


Post a reply to this message

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