POV-Ray : Newsgroups : povray.advanced-users : Quintic Splines : Re: Quintic Splines Server Time
30 Jul 2024 00:18:07 EDT (-0400)
  Re: Quintic Splines  
From: Chris Colefax
Date: 29 Jul 2000 22:07:42
Message: <39838dee@news.povray.org>
Mark Wagner <mar### [at] gtenet> wrote:
> I'm working on a system for making fly-throughs of landscapes.  I've run
> into a problem: The camera follows the specified path just fine, and turns
> properly.  However, when making those turns, it doesn't bank properly.  If
I
> understand the math I'm using properly, the cause of this problem is that
a
> cubic spline is smooth in the path and first derivative (which gives me
the
> position and turning), but not in the second derivative (which is used for
> the bank).  So, I need the math for creating quintic (fifth order)
splines.
> Does anyone know anything about this, or where I can find the information
I
> need?

Yes, as Ryan says my Spline Macro File does support automatic banking, but
it only uses cubic splines.  Rather than using the rate of change of the
curvature of the spline, I use a 'look-ahead' method, that takes the current
spline position, and two spline positions in the future.  The first is used
to calculate the current direction of the spline, the second (further ahead)
is used to calculate the future direction.  The different between the two
directions gives the 'turning' of the spline.

The reason I chose to use this method, rather than the direct derivatives of
the spline, is that it properly handles cases where the spline's derivative
is zero, and can be extended to other path types.  If you'd like to take a
look at the code (and examples of the automatic banking), you can download
the macro file from my site:

   http://www.geocities.com/ccolefax/spline


Post a reply to this message

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