# Thread: bouncing ball using splines algorithms??

1. ## bouncing ball using splines algorithms??

Hi every body

I wanna ask about any spline algorithm code can be used in OpenGl to make a bouncing ball?

3. ## Re: bouncing ball using splines algorithms??

Generally, the more specific the question is, the more likely it is to be answered properly and quickly.

May be, you would like to add some more detail, describing a bit more what you want to do, what you've tried so far, etc. You don't need to add pages after pages (as this often has the exact oposite effect, very few people will bother reading that!), but for instance, it would be quite helpful here if you would explain what you mean by 'bouncing ball' or 'spline algorithm'. There are several things that come to mind when I (or someone else) read these, but what is your question here, completely eludes me (to use a phrase from Tomb Raider). What distinguishes exact sciences, such as software engineering and the lot, from inexact disciplines is the ability to ask questions in a way that everyone agrees at least with what's being asked!

Also, before starting a topic, previous topics and search engines can be quite revealing.

I hope this helps

[This message has been edited by madmortigan (edited 02-18-2004).]

4. ## Re: bouncing ball using splines algorithms??

I'm so sorry if my question wasn't clear,
well....I'll try to explain more..
what i want to do is that i want to creat animations using opengl ,and I want to make this animation move in a special way,i.e if I have a spline or a curve and I want my drawing to move on the same way this curve goes,how can I do that?

I hope that my words are a bit clearer right now

5. ## Re: bouncing ball using splines algorithms??

Now you're talking...

The thing to do is implement some sort of struct or class to define a path (or even curve) in 3d space. The idea is to update the position of your object (a ball in this case, I assume), using the position on the path. Ideally, the path will have a parameterization, and you'll be able to get a 3d point on the curve, for a parameter value you have. Then, incrementing this parameter at each frame, will give you the next position of the object, which will be following the path.

This is the general idea. I assume you can define your path curve using opengl splines. This sounds kind of interesting to me and I haven't done anything similar so far, so I'll probably get down to it and write a quick and dirty little program to make any further points.

In any case, I hope this helps

6. ## Re: bouncing ball using splines algorithms??

One of the problems is a simple parametrization of the spline won't give you a physically realistic path. There are some papers I read deal with the problem. Try searching google using "spline" "motion".