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