Skip to main content
GameDev.net gamedev.net
🔒 Locked

Particle Collisions with COR

Started by Mr Awesome Apr 1, 2007 at 7:15 PM 6 replies 1.7k views
Original Post
Mr Awesome
Mr Awesome
I'm using the coefficient of restitution to determine the velocity of a particle after it collides with a static plane (of infinite mass). This works fine when the acceleration is zero, or when the plane is perpendicular to the particle's motion. However, when it collides against an angled plane in the presence of a constant nonzero acceleration (ie gravity), the particle eventually stops completely on the plane, unless the coefficient of restitution is 1. I understand the reasons for this, but I do not know how to correct it. Assuming there is no friction at all, the particle should continue to slide down the surface of the plane. It seems that the COR does not correctly handle the "collisions" of a particle sliding down a surface. How can I effectively model this sliding behavior while still providing correct behavior upon a forceful collision?
oliii
oliii
The CoR should still provide the slide effect. If the particle slides down the plane, it will effectively bounce an infinitesimal amount with the CoR equation.

The CoF coefficient (friction), if modelled simplistically, would still allow teh particle to slide down, but at a greatly reduced speed. The problem is actually to stop the particle on an incline (static friction)!

If the particle gets stuck on a plane, then there is something wrong elsewhere.

Vparticle -= (1.0f + CoR) * (Vparticle . Normal) * Normal;

CoR in range [0...1].

with friction

Vn = (V . N) * N
Vt = (V - Vn)

Vparticle -= (1.0f + CoR) * Vn + (CoF) * Vt

CoR and CoF in range [0...1].
Everything is better with Metal.
Mr Awesome
Mr Awesome
Thanks for the reply. However, I'm not quite sure how I would use these equations in my own simulation. Currently, I am using Verlet integration, and when a collision happens, I move the particle's position back to the surface of the plane, then reset its old position so that its new velocity will be equal to that dictated by the COR.

You said that the slide effect would be produced by infinitesimal collisions. How would these happen of the COR were 0? Would there be any sliding at all? Does a constant force like gravity determine whether there is sliding in a collision with a COR of 0?
oliii
oliii
A CoR of 0 should produce sliding (in fact, just pure sliding, no bounce). However, there will be cases where you could have the particle going through the plane with FP innacuracies.

The gravity vector does dictate sliding. If you are on an incline, the velocity will be pointing down, and with the CoR=0, the velocity will then be pointing along the incline, making the particle slide.

If CoR > 0, you will have a persistent small bounce effect, hence my comment on the infinitesimal bounce. But CoR of 0 should make it slide. a CoR < 0 will make it stick.

Everything is better with Metal.
Mr Awesome
Mr Awesome
Understood, thanks for the explanation oliii. I have only one concern left, which is collisions sans any outside forces like gravity. With a COR of 0, a particle colliding with a slope (with 0 acceleration) should "stick" to the slope, not sliding at all, correct? For example, rolling a snowball across a billiards table causes it to stick to the sides, since it has a COR of 0. The algorithm you posted would cause a particle to continue sliding down the slope regardless.

The other part to this question is, in a system with 0 acceleration, how does the COR affect the angle of bounce?
oliii
oliii
Nope, even without gravity, the particle will still slide.

What the gravity does is increase the velocity. And when you apply the response, you are only interested in the velocity of the particle and reflect it (with an angle dictated by the CoR).

The only thing making a particle stick to the slope, like would be friction with the surface. My comment with a CoR < 0 is probably misleading, so ignore that. CoR should be in the range [0...1].

Without friction, a ball on a billiard table with a CoR of 0 will just slide around endlessly (if your conserve energy accurately). The ball will not even roll at all, just slide without any rotation to it.

What makes it spin, roll and stick to the walls (if you add some 'top spin') is friction.

The coefficient of restitution only dictates the angle of reflection of the particle / ball. With CoR of 0, the best the particle can do is slide. With CoR of 1, you will have a perfect reflection, and the particle will bounce at the same angle. You will have a 'sticking' particle only if the particle hits the plane at exactly 90 degrees. The the particle velocity will become (0, 0, 0), and it will stick.

in short, if CoR in range [0...1], it wont affect or shouldn't affect the stickiness, just the bounce (0 for pure slide).
Everything is better with Metal.
Mr Awesome
Mr Awesome
Thanks a lot oliii for clearing all that up, I completely understand the COR now. [smile]
oliii
oliii
Just an errata. A ball with a CoR of zero moving around a pool table will eventually stop, slide around a couple of cushions, then stop at one of the corner of the table :) With a CoR of 1, it will bounce endlessly.
Everything is better with Metal.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.