# Resting in contact [constraint and iteration]

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

## Recommended Posts

Hello, i read some paper about resting in contact for rigid body physics.

The way of one paper to resolve this problem is to apply impulse for each contact until all contact verify this equation :

Velocity After Contact = -e * Velocity before Contact.

But in the case of stacking rigid body i imagine the problem.

For example a simulation with ground and 2 bodies.

body2
------- Contact 2
body1
------- Contact 1
ground

1. We apply impulse for body at bottom. (this contact verify the condition above), all is ok.
2. We apply impulses for contact 2 at top. so it will modify the relative velocity from body 1, then the relative contact velocity 1, will invalidate the first condition.

So i dont know if it's the best techniques to resolve resting in contact.

But it has the advantage to be very understable.

Thank you for some tips!

##### Share on other sites
This technique is called relaxation and usually converges to a global solution. Look here to get the idea: http://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method

##### Share on other sites
You could use relaxation or you can do a topological sort and resolve once in the correct order.

##### Share on other sites
Relaxation is the faster way to resolve contact penetration?

Thank you!

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 13
• 19
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
632936
• Total Posts
3009312
• ### Who's Online (See full list)

There are no registered users currently online

×