pool ball hitting cushion

Please don't post Bullet support questions here, use the above forums instead.
gc36
Posts: 7
Joined: Thu Jun 05, 2008 10:23 am

pool ball hitting cushion

Post by gc36 »

I am trying to get a pool ball to bounce off a side cushion (wall) realistically. To do this - I apply restitution on the normal component of the velocity. I then apply a tangential force that is proportional to the impulse with which I send the ball bouncing back (as the frictional force is proportional to the normal reaction force). But this seems to violate the conservation of energy For example - say the restition of the wall is 1, and if the ball hits the wall very very hard and at an angle but no spin - it rebounds with the same velocity - BUT also starts to rotate. So now we have the same linear momentum but some additional angular momentum.

What am I doing wrong? Any pointers to websites would also help.
Thanks!
colinvella
Posts: 24
Joined: Sat Feb 09, 2008 2:38 pm
Location: Malta

Re: pool ball hitting cushion

Post by colinvella »

The friction law you are applying is known for increasing the energy of a system in some cases. Try using lower coefficients of restitution and friction. Alternatively, you can also try computing the energy before and after the collision, and lower the velocity accordingly. If your linear and angular velocities are in vector form, a possible energy function you can use is E = LV^2 + AV^2 where LV and AV are the linear and angular velocity vectors. If E_after > E_before, you would then reduce the magnitude of LV and AV by sqrt(E_before/E_after). These are all hacks however :)

There exist more sophisticated friction models that avoid this energy increase problem. I suggest you have a look at Chapter 6 of Physics-Based Animation by Erleben et al.