modeling billiard table

modeling billiard table

Post by Dean War » Mon, 21 Mar 2005 11:09:15


I am trying to construct a model for use in a video game



Basically I have boiled things down to the following situation that needs to
be modelled:







Think of a snooker/pool table (without the pockets) with two balls on it.



The balls bounce around colliding with the sides of the table and each
other. Perfectly elastically for simplicity.

For further simplicity, there is no friction. Maybe they have unit mass.



Basically picture two circles bouncing around inside a rectangle.



My question is:



Given:

1) the dimensions of the rectangle and the circles.

2) the initial velocities of the circles



Is there an equation where I can find the location of the circles at time t?



e.g.

circle_one_centre(x,y) = f(t)

circle_two_centre(x,y) = f(t)





If so, how do i go about finding this equation?



what about the same thing for n circles?



Different shaped tables??





Any ideas?





Thanks for any help



Dean
 
 
 

modeling billiard table

Post by Matthew Je » Mon, 21 Mar 2005 14:24:41

I hope you reconsider your strategy.
If you simplify away all the effects that make the game interesting, you
will have little left.

- Matt

 
 
 

modeling billiard table

Post by Gerry Quin » Mon, 21 Mar 2005 18:50:35

In article <fX4%d.3809$ XXXX@XXXXX.COM >, XXXX@XXXXX.COM
says...


No. Even this simple system is chaotic, and there is no finite closed
form equation that will give the result you want. You have to calculate
to the next collision, then the one after that, and so on.


You add the problem of multi-ball collisions.


Less of a problem - I don't think this makes the situation all that much
more difficult.

- Gerry Quinn
 
 
 

modeling billiard table

Post by Markus See » Thu, 24 Mar 2005 07:22:19


I once read a paper on Gamasutra.com, where circle-circle collision
detection/handling was discussed.

Perhaps something you could use, just register there and search
for "Pool Hall Lessons".
No friction is handled there, though.

hth, Markus
 
 
 

modeling billiard table

Post by Dean War » Sat, 26 Mar 2005 11:41:31

>> > Can you get a finite closed form equation for the ball position?

From what I can gather the term means (from the posts and google), I was
indeed looking for a closed form equation.

Also, I know you had to repeat yourself Gerry, but I wasn't sure that
chaotic systems cannot be defined by closed form equations. I was going to
quote the fox-rabbit population equation, but then I remembered that that
was iterative too. But, even if chaotic systems cannot be defined by closed
form equations, you did not show/"prove" that the system under discussion
was indeed chaotic! (which was implicit in "if not, why not" question)


Anyway, please read my new post "It has failed, how do I handle my
collisions now?"

This shows what I am really after.
 
 
 

modeling billiard table

Post by Gerry Quin » Sun, 27 Mar 2005 05:21:46

In article <vTK0e.1868$% XXXX@XXXXX.COM >, XXXX@XXXXX.COM
says...

It's not my job to prove correct answers, and I'm not a mathematician.
But in a nutshell:

The system is clearly chaotic as a result of its physical configuration.
The ball positions at time t after a collision depend sensitively on the
exact trajectory of the balls before the collision. Vary the initial
position of the collision by one millimetre, and a moment later the
position will be a metre from where it was. This kind of process
happens repeatedly, and the ball position at later times as a function
of the initial trajectory becomes scattered all over the table (it may
be more dense in certain parts of the table), even for initial
trajectories that were very close together In other words, chaos in a
typical form.

As t goes to infinity, the functions defining the position at t have to
come arbitrarily close to a non-differentiable curve. Any closed form
analytic solution will run towards infinitely many terms. (In practise,
the functions would be horrific even after two or three collisions,
though in principle it might be possible to find functions that will
work through a few iterations.)


For your very simple system, calculate the next collision position,
calculate the results of the collision, and repeat ad infinitum. For
balls with real physics, I recommend some intensive googling.

- Gerry Quinn