Jump to content
  • Advertisement
Sign in to follow this  

Resolving contact force to prevent penetration and LCP

This topic is 2205 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im working through "Dynamic Simulations Of Multibody Systems" by Murilo Coutinho.
Ive got a ball rigid body (B1) and a plane. I've been trying to setup the LCP problem to calculate the force require to prevent pentration.
The problem is

a = AF + b
a >= 0
F >= 0
aF = 0

a = relative acceletaion at the contact point (to solve)
A = a constant (roughly the inverse mass at the contact point)
F = relative force at the contact point (to solve)
b = current relative acceleration at contact point + relative velocity x contactFrame time derivate.

The ball has a gravity force of -10 units, and mass = 1 so -10 acceleration too.
When there is no rotation, all works fine. But when there is rotation, the contact point on the ball gets a centrepetal acceleration so its accelertaion becomes -9.

So it calculates a force of +9 to apply at the contact. But the body still has an accn of -10, so applying this force won't prevent penetration. I could just calculate the force required to prevent penetraion but that would violate the aF = 0 constraint.

I've been googling all over the place the past 2 days and im nearly bald from tearing my hair out so Id be really really grateful for any help.
I know someone posted a similate comment (Bastian1978) but it doesnt help me maintain the constraints which I need so I can extend the system to sovling multiple simultaneous contacts.

Formule are:

b = B1.netForce/B1.mass + (B1.inertia^-1 * B1.Torque + B1.angualMomentum X B1.W) X r1
+ B1.W X (B1.W X r1);
+ (B1.V + B1.W X r1) * (coordFrame time derivate)

A = (I * B1.invMass) - (x1 * B1.inertia^-1 * x1);

r1 = contactPoint - B1.centre of mass
x1 = r1.skewSymmetric
I = identity matrix

The final term of 'b' is zero as the contactFrame remains stationary.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!