Jump to content

  • Log In with Google      Sign In   
  • Create Account

Dirk Gregorius

Member Since 24 Apr 2002
Offline Last Active Today, 09:59 AM

Posts I've Made

In Topic: What Brings About Linear Complementarity Problem In Rigid Body Dynamics?

24 July 2016 - 05:52 PM

 

 

I just can't seem to understand the underlying LCP problem, the math things I mentioned above.

 

Assume you have a 1d LCP of the form: w = a * z - b >= 0 and z >= 0 and w * z = 0

 

From the complimentary condition w * z = follows that either w or z must be zero  (a product is zero if any of its factors is zero). Let' start with w = 0

 

w = a * z - b = 0 <=> z = b / a >= 0

 

We know that a (the effective mass) is larger zero so z is larger zero if b is larger zero. b = -J*v which is positive if the relative velocity is negative (which is the case if the two bodies are approaching each other). If we cannot find a w = 0 and z >= 0 we test the other complimentary condition z = 0:

 

w = a * 0 - b <=> w = -b >= 0

 

Again we know that b = -J*v . If the the relative velocity is larger zero than the impulse/force z must be zero. Otherwise we would create a sticky contact. 

 

For the LCP it really doesn't matter whether you solve for impulses/velocities or forces/accelerations. What is important is how contacts work. You need to look at the problem momentarily. At some instance in time two objects are overlapping and creating a geometric contact (contact points and normals). If the objects are approaching each other the contact impulse/force kicks in and prevents this by removing all relative velocity towards each other. If the objects are overlapping but separating then no contact impulse/force is activated as the objects are already separating. This is the correct physical behavior obviously since there is no resistance if you pick some object up from the ground for example.

 

In order to understand these things you don't need to read more (this can be often more confusing than helpful), but you need to write down a simple 1d example and put in some feasible numbers and examine what the results mean. Best by hand, second best in the debugger. 


In Topic: What Brings About Linear Complementarity Problem In Rigid Body Dynamics?

23 July 2016 - 09:21 AM

 

LCP only exist in case of multiple contacts

Nope, this is wrong. The LCP exist even for a single contact point. We need an LCP to model contacts properly, not to handle many contacts.


In Topic: What Brings About Linear Complementarity Problem In Rigid Body Dynamics?

22 July 2016 - 10:59 AM

Think of a ball resting on the ground. The contact point is only active if the ball is accelerating downwards. In the moment you pick it up there is no contact force.

I think the confusion here is about the term linear system. Richard means a system of linear equality equations. You cannot model contact with equality constraints. You model contacts using the Signorini conditions (should also be in the citied paper) which makes the problem an LCP. The LCP is still linear, but with inequalities and the complimetary condition. If you would use a linear condition you would get sticky contacts.

The complimentary condition is what is essential for modeling contacts. If the relative acceleration is larger zero the contact force is zero. Or the contact force is active and removes all relative acceleration.

A good excersise is to solve a 1d LCP and then translate the meaning to the contact problem.

So yes, global LCP solvers can indeed solve this as well. There is a whole lot of problems with overconstrained systems. The four leg table is a good example. The solver can give you mg/2 in two diagonal legs and you would get the correct dynamic response. All variations that create equilibrium are feasible, but we know that we have in each leg a force of mg/4. I think Mirtichs PhD talks a bit about these problems.

In Topic: SAT - Same Plane Triangle

07 July 2016 - 11:46 AM

Thanks, I am glad you like it. If you are interested in these kind of presentations (what your name suggests) you kind find a lot similar presentations on the GDC Physics Tutorial website hosted on Box2D: http://box2d.org/downloads/

 

Similarly, the GDC Math tutorial has lots of presentations collected over the years as well:

http://www.essentialmath.com/tutorial.htm


In Topic: SAT - Same Plane Triangle

06 July 2016 - 05:03 PM

Your observation is totally correct! None of the triangle/triangle tests (SAT, Moeller, ...) handle the co-planar case by default iirc, but all rely on handling it as a special case. Sorry, I should have pointed that out. I only read over the SAT part and the possible separating axes.


PARTNERS