Contact force situation

Started by
9 comments, last by bpj1138 11 years, 8 months ago
Hi, since no one has replied (though Im greatful for the number of views), I thought I'd clarify the situation.

A ball is in contact with a plane. At the contact point, the relative velocity along the contact normal is zero. The ball's centre of mass (COM) has accn of -g. The ball is spinning at such a rate that at the contact point, the centripetal accn cancels out the gravitational accn. So the calculated contact force to prevent penetration of the point is zero.

Obviously, this will not prevent the ball penetrating the plane.

I've now looked at the equations by Baraff, Eberly and Coutinho and all get this result of zero contact force.

What am I doing wrong? Do I ignore centripetal accn (even though the above authors don't)? Is it simply an unavoidable situation that I'll to code for?
Could anyone do an example calculation for me?
Advertisement
I guess the authors use convex polyhedra in their algorithms. A ball has an infinite number of extremal points. The point of the ball actually touching the plane is not the point which is penetrating it in the next time step. If you approximate the ball with a polyhedron your algorithm should notice that there is a new point of contact and calculate the appropriate impulses to prevent penetration.
Hey Inferiarum,
wow thats a really good point they do use convex polyhedra whereas I was using a perfect sphere. Guess Ill have to bite the bullet and implement a general intersection test for trimeshes. Im thinking either V-clip or GJK.. any recommendations?
Still, even if it were a polytope, the force required still wouldn't be enough in one go, it would take 1 or more iterations of the response algorithm to prevent penetration. Does that sound right? (I was previously under the impression that once the force was calculated, it would at least prevent penetration until the end of the time step).

Anyway thanks alot Inferiarum
You do not have to do any iterations. In the case you described, you do not need a force preventing penetration, because the point will never penetrate the plane. If it was a polytope with only the one extremal point touching the plane, the center of mass would accelerate towards the plane, but the one point would stay on the plane because of the rotation. Your algorithm should then detect when the 'next' point would penetrate the plane and adjust the momenta accordingly. This would have the side effect of slowing down the rotation.

edit: concerning the algorithms I cannot really help you. Implement something you find easy to understand i guess.
I think one of those authors you mentioned admitted that with the inclusion of friction into these LCP problems, the system may be "unsolvable". I got as far as checking out a book on the "Simplex" method, then promptly gave up on the whole thing. What I'd like to see is a solution similar to the Verlet which would work with classic RBD. Good luck with your quest, and keep us posted on your progress.
--bart
Thanks for you're reply. Think I understand. It was just that in Coutinho's book, it said that after contact forces had been resolved, you can integrate to the end of the time step and no interpenetration will have occured. I guess he meant to add 'at that particular point on the body'? If that's the case I can see also why its necessary to use polytopes, as with the smooth sphere it would seem that in the above mentioned case that the simulation would be stuck in an infinite loop (because in the above case no state changes are made, the ball goes on to penetrate the plane, exactly as in the previous step, and then the system backs up the ball to the time of contact, and repeats the resolution - if that makes sense?). Either way thanks a lot think Ive had a big conceptual spoon up.
Hi bpj1138, yes it says that there should always be a solution in the frictionless case (which Im currently [trying] to implement) but not always for the friction case.
I strongly urge you to discard the force/acceleration model in favour of impulse/velocity. The later is a million times easier to implement and to find up to date tutorials / example code.

Have you seen my 'Physics engines for dummies' article?

http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/

It should give you some pointers :)

Cheers, Paul.

I strongly urge you to discard the force/acceleration model in favour of impulse/velocity. The later is a million times easier to implement and to find up to date tutorials / example code.

Have you seen my 'Physics engines for dummies' article?

http://www.wildbunny...es-for-dummies/

It should give you some pointers smile.png

Cheers, Paul.


I guess each physics simulator works with impulses implicitly because of the discrete nature of the simulations. The forces under consideration are used to keep bodies in resting contact.

I guess each physics simulator works with impulses implicitly because of the discrete nature of the simulations. The forces under consideration are used to keep bodies in resting contact.


Certainly it used to be the case that most simulators would treat collisions via impulses and then resting contacts via a force/acceleration model, but things have come a long way since then - these days its popular to treat collision and resting contact via impulses only - if handled correctly they are just visually stable, handle stacking very nicely, can treat friction without having to linearise and are numerically stable and you'll never end up in a situation where your LCP solver suddenly explodes due to an 'infeasible solution'. :)

For research, I suggest googling 'sequential impulses' ref Erin Catto.

Cheers, Paul.

This topic is closed to new replies.

Advertisement