Need a curve algorithm

Blitz3D Forums/Blitz3D Programming/Need a curve algorithm

mrtricks(Posted 2005) [#1]
Hi, I'm in need of a curve algorithm. I've looked at bezier curves, but they aren't suitable: with them, the curve doesn't actually go through the control nodes (apart from the beginning and end). I would like a curve that goes smoothly *through* all control nodes. (Actually it would be great if they went through all nodes, with a user-set direction, in 3D, but one step at a time!)

I'm not demanding someone write me a function! - just wondering if anyone knows of a specific type of curve that is designed to do just this, and then I can google that. I've looked up some famous curves, but they seem to be formulae rather than algorithms, and don't involve user-data.

To illustrate, imagine a single garage placed anywhere that can have its door pointing in any direction. Then put a car down anywhere, facing any direction. The car can only drive forward. I want it to take the most sensible smooth route forward to be able to drive into the garage, even if it means initially driving away from the garage. (This is not actually what it's for, but it's a good analogy!)


DJWoodgate(Posted 2005) [#2]
Hermite maybe.
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=781


mrtricks(Posted 2005) [#3]
Thanks - I'll try that out when I get home...


John Blackledge(Posted 2005) [#4]
Try this:
http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=gillissie01072003193812&comments=no


mrtricks(Posted 2005) [#5]
Interesting functions. They seem to come up with some weird results though, not resulting in the most straightforward path through a series of nodes...