By: nobody ( Nobody/Anonymous ) |
This is an issue I have not seen addressed often. For a practical application consider a rack of pool balls and the collision on the break. I have tried to model this by approximating 3 ball collisions which looks ok, but I think my method is incorrect. Solving for energy in these situations I think may be impossible. I really haven't looked into it that much. I know the basic 2 ball collision doesn't work in these situations. What I was really looking for was a fast way to distribute energy through a connected net of touching objects ( which I can build by detecting collisions over time intervals). I need to propagate energy through the net. Each object has different velocity. It could just be an approximation and does not have to solve for energy for my purposes. I also need an algorithm that does not get stuck in infinite loops and resolves so that the next instant in time does not result in a new collision within the network of objects. One that takes into account for different elasticity of objects would be impressive. Anyone ??? |
By: martinbaker ( Martin Baker
) |
Yes, conservation
of energy will give one equation (because energy is a scalar quantity)
so, on its own, it will not be enough to calculate the resulting linier
and angular velocities. Even if we include the equations from the conservation
of angular and linier momentums (vector quantities) we will not have enough
equations to solve all the unknowns. |
By: nobody ( Nobody/Anonymous ) |
First I was thinking of keeping the collisions instantaneous because if you model things so that collisions take time then things get much more complicated. My program projects the balls ahead in time and finds their next collision. If two collisions occur within the same time step then I cheat and call them simultaneous. For things like pool balls this works ok but as things get more elastic/deformable and collisions take longer this would not be acceptable. You can still maintain a conservation of momentum in a multiball collision. I approximate the resulting velocities by first solving for all two ball collisions independently. Then I scale back all vectors to account for conservation of momentum. It makes sure that one ball colliding with 2 or more balls does not result in more force going out than going in. What makes this more complicated is that these resulting forces often generating new collisions in the net. I have a loop that keeps on solving the collisions this way for about 50 cycles then if it still isn't resolved ( In the worst case the collisions just go round and round in the net never stopping ) I kill the force in deadlocked balls so that others can move. This is very kludgy but surprisingly gives ok results. For pool balls there is also a special case which says that one ball cannot collide with more that 6 other balls as long as the balls stay on the table top. |
By: martinbaker ( Martin Baker
) |
Thank you very much
for this, it is useful to get other peoples experience of what works in
practice. |
By: nobody ( Nobody/Anonymous ) |
I thought of trying
the two-way collisions approach but it did not appear convincing. Consider
the case where you have three balls in a triangle (all balls touching)
and you hit the head ball with the cue ball head on. Force is distributed
equally between the two balls touching the head ball. If you say one collision
occurs before the other and redistribute the energy between the balls
in the first collision before the second then the collision will not be
symetric. If you try to treat the two collisions as simultaneous 2 ball
collisions then this happens. The force is imparted from the head ball
onto each back ball appropriately as if it had been in a 2 ball collision.
If you add the momentum for the two back balls together will see that
this vector is larger than the momentum for the cue ball going into the
collision. In this case I find a scalling factor which makes the combined
out vector the same size as the in vector. I think I change the head balls
out velocity to 0 in these cases ( After all it has imparted all its momentum
to the other balls ). If the combined out vectors are larger than the
in vector then I then scale all out vectors by this scaling factor ( This
is not the accurate way to model collisions: It is a home made symettry
that probably is wrong and may not exist in nature ). If the angle between
balls is very flat so the head ball does not impart all of its momentum
into the other two balls then no scalling is needed and the head ball
may even keep rolling. In these cases I would treat it the same as two
seperate 2-ball collisions. Even if the cue ball hits the head ball at
a strange angle this yields a visually appealing break. I will tell you
though this is a kludge and is not pretty. Especially when you have to
start dealling with multilple in and out vectors. I think this approach
is definitely not the best especially when dealling with a network of
touching balls. How is force distributed through a mesh when they do a
simulation to stress test something? Isn't this the same situation??? |
By: martinbaker ( Martin Baker
) |
Thank you, these are
really good examples. |
By: nobody ( Nobody/Anonymous ) |
Hi Martin, |
By: martinbaker ( Martin Baker
) |
Hi Stephen, |
By: nobody ( Nobody/Anonymous ) |
Hi Martin, |
By: martinbaker ( Martin Baker
) |
Stephen, |
By: nobody ( Nobody/Anonymous ) |
Hi Martin, |
By: martinbaker ( Martin Baker
) |
Hi Stephen, |
By: nobody ( Nobody/Anonymous ) |
Hi Martin, |
By: martinbaker ( Martin Baker
) |
Stephen, |