POV-Ray : Newsgroups : povray.advanced-users : Quintic Splines Server Time
26 Nov 2024 09:45:14 EST (-0500)
  Quintic Splines (Message 1 to 7 of 7)  
From: Mark Wagner
Subject: Quintic Splines
Date: 29 Jul 2000 01:53:25
Message: <39827155@news.povray.org>
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?

Mark


Post a reply to this message

From: ryan constantine
Subject: Re: Quintic Splines
Date: 29 Jul 2000 04:15:20
Message: <39829262.A16A77A9@yahoo.com>
i'm pretty sure chris colfax's spline animator macro does all this.  the
camera (or any object) follows a defined spline, turning, and banking. 
in fact he has controls so you can adjust the amount of banking.  and i
think it is just a pov file so you should be able to read whatever
information you need from it.

Mark Wagner 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?
> 
> Mark


Post a reply to this message

From: Chris Colefax
Subject: Re: Quintic Splines
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

From: Bob Hughes
Subject: Re: Quintic Splines
Date: 30 Jul 2000 03:30:21
Message: <3983d98d@news.povray.org>
That's a great tutorial on the spline macro, I'll have to try and use your
macro for a change instead of guessing with 3 different splines for the
position, look at point and tilt.

Bob


Post a reply to this message

From: Josh English
Subject: Re: Quintic Splines
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

From: Mark Wagner
Subject: Re: Quintic Splines
Date: 1 Aug 2000 01:53:44
Message: <398665e8@news.povray.org>
Josh English wrote in 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.


You use the curvature for the amount of bank, and the normal vector for the
direction of bank.

Mark


Post a reply to this message

From: Josh English
Subject: Re: Quintic Splines
Date: 1 Aug 2000 12:41:35
Message: <3986FE4C.90CCBBCD@spiritone.com>
The way I calculate it, the normal vector always points to the "right" of the
spline no matter where the curve is. After my final next week I'll take another
stab at it.

Josh

Mark Wagner wrote:

> Josh English wrote in 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.
>
> You use the curvature for the amount of bank, and the normal vector for the
> direction of bank.
>
> Mark

--
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.