With Hemlos' lib you can interpolate spline curves, if you know the control points. http://www.glbasic.com/forum/index.php?topic=3839.msg28012#msg28012 (http://www.glbasic.com/forum/index.php?topic=3839.msg28012#msg28012)
I continued this and will generate the control points for a polygonal line, so the curve touches all your input points in order.
See the example - just click points with your mouse, the spline will be generated interactively.
It's very useful to generate racing tracks or curves for cars that follow a route.
That might come in very handy at some point. Cheers Gernot. Nice to see you about BTW :)
Wait...who is this user? I better report it to the moderators! =D
Indeed, the code is superbly clean and small, a quick look and it seems even the likes of me can use it and there are many uses to put such into action. Great work!
I have plotted many far away from each points to check how the older points (till what level?) would conform, the result is really great! :)
Cool - will check this out - I did my own beziers for one of my games...but a library is always handy!! :)
Very handy for baddie or camera movement patterns too. Great stuff! :good: