POV-Ray : Newsgroups : povray.advanced-users : Quintic Splines : Re: Quintic Splines Server Time
30 Jul 2024 00:19:42 EDT (-0400)
  Re: Quintic Splines  
From: Josh English
Date: 31 Jul 2000 15:19:10
Message: <3985D1B3.81F2B31A@spiritone.com>
I attempted to calculate the curvature of the spline for my bezier macro, but
I've never been satisfied with the results. One of the main problems is that the
curvature calculation gives a positive number, so I don't have an easy way to
find out which way to bank the object.

Josh English

Chris Colefax wrote:

> 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

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

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