# dealing with multiple contact points

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

## Recommended Posts

I've been searching for good way of dealing with multiple contacts for a while now. It is pretty hard to find any relevant information on the subject. Does anyone know of any easy to understand tutorials/articles/code samples? [Edited by - glSmurf on June 7, 2005 10:36:08 AM]

##### Share on other sites
Yay ..that should be enough =)

Thanks John

##### Share on other sites
The more realistic is the LCP method but hard to implement ( not a lot of clear documentation ) and the impulse based methode is quite simple to implement but it's hard to deal with friction

##### Share on other sites
Quote:
 Original post by maxime959The more realistic is the LCP method but hard to implement ( not a lot of clear documentation ) and the impulse based methode is quite simple to implement but it's hard to deal with friction

In terms of realism, energy accuracy, and symplectic-ness (area preservation of motion), I'll put an impulse-based simulator up against any LCP-based simulator.

I was able to implement an energy-accurate simulator (can run for weeks without drift) using 100% impulse physics (no ad hoc or penalty forces): the motion looks real. Reasonbly accurate simulation of friction (not just basic Coulomb friction) is also possible (as opposed to truncated approximations typical in "optimization methods" (Jacobi formulations, etc.)).

I have yet to see an LCP or other implicit/semi-implicit simulator perform in such a manner. The big win for the LCP and implicit/semi-implicit integrators is general stability and ease of implementing arbitrary constraints (and that's a big win for a commercial product).

An energy-accurate, fully symplectic, general constraint solving simulator would make an ideal candidate for a standard OpenPL physics system. It's certainly possible, it's only a matter of time (perhaps already been done but not published). A particle-based method would most accurately reflect reality (ILM uses a decent method), as nothing is truly rigid. This would also allow for transitioning between soft and hard objects, as well as arbitrary constraints, realistic deformation, stacked objects, cascaded collisions/stacking/propagation, and ease of fracture. Particle systems are also relatively small, and easy to implement (including implicit or semi-implicit methods with energy-correctors). Such a system should run very fast on relatively simple hardware (and memory access/caching could be very efficient)... In the past, multiplication, division, and sqrt were very expensive. When the same strides are made with a particle-physics-based processor, rigid objects and stiff constraints won't be expensive anymore.

Another win for a particle-based hardware simulator: the entire system can be computed in parallel. A prediction: a quantum computer will allow extremely complex physical simulations to be computed using a parallel-particle model.

[Edited by - John Schultz on June 8, 2005 12:23:21 AM]

##### Share on other sites
Quote:
 Original post by maxime959The more realistic is the LCP method but hard to implement ( not a lot of clear documentation ) and the impulse based methode is quite simple to implement but it's hard to deal with friction

I don't get what you mean by this - it's possible to use a LCP solver to calculate impulses so you're not comparing like with like.

One thing about John's list - jiggle doesn't use penalty forces it uses penalty impulses to resolve penetrations caused by terminating the iterative solution method early.

##### Share on other sites
Quote:
Original post by MrRowl
Quote:
 Original post by maxime959The more realistic is the LCP method but hard to implement ( not a lot of clear documentation ) and the impulse based methode is quite simple to implement but it's hard to deal with friction

I don't get what you mean by this - it's possible to use a LCP solver to calculate impulses so you're not comparing like with like.

One thing about John's list - jiggle doesn't use penalty forces it uses penalty impulses to resolve penetrations caused by terminating the iterative solution method early.

Sorry Danny, I thought your code applied relaxed impulses (which I would consider to be effectively forces (acting like springs, as the change would not be instantaneous)). Thus, as soon as you relax an impulse, it acts like a force...

##### Share on other sites
Quote:
Original post by MrRowl
Quote:
 Original post by maxime959The more realistic is the LCP method but hard to implement ( not a lot of clear documentation ) and the impulse based methode is quite simple to implement but it's hard to deal with friction

I don't get what you mean by this - it's possible to use a LCP solver to calculate impulses so you're not comparing like with like.

One thing about John's list - jiggle doesn't use penalty forces it uses penalty impulses to resolve penetrations caused by terminating the iterative solution method early.

Sorry, I meant LCP method and relaxed impulses method.

Quote:
 I was able to implement an energy-accurate simulator (can run for weeks without drift) using 100% impulse physics (no ad hoc or penalty forces): the motion looks real. Reasonbly accurate simulation of friction (not just basic Coulomb friction) is also possible (as opposed to truncated approximations typical in "optimization methods" (Jacobi formulations, etc.)).

I would be very interested to see your code and maybe examples. ( not that I don't believe you :) )

Quote:
 I've been searching for good way of dealing with multiple contacts for a while now. It is pretty hard to find any relevant information on the subject. Does anyone know of any easy to understand tutorials/articles/code samples?

You can look at my implementation http://www.sf.net/projects/inertia2d

[Edited by - maxime959 on June 8, 2005 7:24:12 AM]

##### Share on other sites
Quote:
 Original post by maxime959I would be very interested to see your code and maybe examples. ( not that I don't believe you :) )

John's stuff is here:

http://www.brightland.com/ac/amazingcurves_networked_physics.htm#Perfect_Physics

Quote:
 You can look at my implementation http://ww.sf.net/projects/inertia2d

For anyone else looking - the missing letter in this URL is a "w"!

thx :)

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 9
• 34
• 16
• 11
• 10
• ### Forum Statistics

• Total Topics
634122
• Total Posts
3015644
×