# Two situations that aren't handled by any engine yet. (I think)

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

## Recommended Posts

Here are two situations that my engine is having trouble with. I searched on the web extensively but could not find any engine that handles both problems correctly. The fundamental problem I think is : Vrel' = -eVrel only holds for two-particle collisions. It is not correct for collisions between more than two bodies. I'm not sure if its even correct for multiple contact points between only two bodies. I've implemented an LCP solver to see if it resolves this problem, but it does not. Thanks for considering the problem. To me, this seems like quite a fundamental problem, that I want to solve before even attempting friction. [Edited by - CuppoJava on January 1, 2005 2:54:28 PM]

##### Share on other sites
If properly implemented, using a LCP will resolve it... the whole purpose of using a LCP (Solving Ax=b, with constraints) is that it will resolve all contacts.

##### Share on other sites
Almost forgot, try the paper "Complementarity Based Multiple Point Collision Resolution" :)

##### Share on other sites
The LCP solver changes the constraint:

Vrel' = -e*Vrel

to

Vrel' > -e*Vrel

But this is still not correct.

This image shows the correct result of a perfectly elastic collision. But notice that the magnitude of the final relative velocity between blocks 1 and 2 is actually smaller than the magnitude of the initial relative velocity. Which violates

Vrel' > -e*Vrel

PS: Thanks for the link to the paper. That was the exact one that I used to implement my LCP solver, but, to my frustration, it still doesn't resolve the progation problems correctly.

##### Share on other sites
Any suggestions?

I really want to be able to resolve the situation in my second drawing, but I can't find any way to do it.

##### Share on other sites
Actually the Newton engine handles that situation correctly.
I think they even have demos with perfect Newton Cradles in there website

##### Share on other sites
Okay, I tested the Newton Engine and unfortunately it doesn't handle it either.

Here's what I did:

I downloaded the Newton Playground demo, and constructed the "simultaneous problem" situation in the first picture. I couldn't figure out how to turn off gravity so its not exactly the same as the picture. I put two blocks on the floor side by side, and I dropped another block exactly twice as big onto the two. The two blocks jumped up upon collision! This shouldn't be happening for perfectly rigid bodies.

##### Share on other sites
Oh I see, I think your test conditions are incorrect.
I think you are a little confused as how physics engine works. All physics engine use LCP solvers to determine the relative acceleration or transfer of momentum between contact points of ridig bodies. The LCP is the method that will calculate this accelerations correctly, I recommend you to read the work of David Baraf, Andrew Witkin, and perhaps simpler the work of Chris Hecker.

The problem with you test is that you assume the objects are point particles, and a such the will be only on contact directed the center of the particle in each collision, but that is not truth when you deal with rigid bodies other than mass particles.

Physics engine used collisions system to calculates contacts based on objects interpenetration, points of impact are rearly exact. To resolve the penetration a small amount of penalty is added at each contact point though adding extra momentum to the collision solver. Also the contact calculation is based on geometrical algorithms that do not guarantee perfect symmetrical distribution of contacts.

In the example you proposes the when you say:

Vrel' = -e*Vrel

You are solving the problem analytically making the abstraction of one contact per object at the object center; you ignore angular momentum, and contact distribution, friction, etc.

That identity is the exact condition used by physics engine solvers (LCP), except the condition is applied to each contact point. The result you are expecting will only happens if the contacts distribution is perfectly symmetric, the object are not rotating and friction is not considered.

When you set your example those conditions do happen at each contact point at the moment of the impact however a tiny asymmetry lead to a small deviation, and because the physics engine has to continue the integration, since physics is an initial value problem, tiny errors in the initial condition lead to large error during the integration.

An easier way to test that theory is by using spheres, in a friction less surface that will prevent the spheres from rotating, and therefore they will behave more closely to point mass objects. An example of this is a Newton Cradle. Another example is a pool, even thought in a real pool game to reproduce that condition you need to be a very good player.

When I said the Newton engine handle that condition I was referring to the solver part, the Newton engine have and exact solver, which mean the solution is not and approximation to the LCP condition, after each step the LCP condition is satisfied 100%.
Currently Newton and ODE are the only two engines in the market with exact LCP solvers, the difference is that ODE recently changed to an iterative method.

Having an exact solver does not mean the result will be 100% predictable, for that to happens you need to do a better job at setting your parameters, and you environment. If you set your test condition correctly then Newton is the only physics engine that is capable of producing those results.

##### Share on other sites
Surely this sort of thing has been done, like in pool and snook games?

ace

##### Share on other sites
Sorry i'm so unclear. I've been misunderstood again. It explains why i'm a coder and not a writer :)

Anyway, the equation
Vrel = -eVrel'
is directly talking about the relative velocities of the points. This is taken straight from Baraff's paper.

I'll try explaining the problem above again.

Before the collision, the relative velocity of the POINTS on block1 compared to block2 is say -3. And the relative velocity of the POINTS on block2 compared to block3 is smaller, say -1.

After the collision, the relative velocity of the points between block 1 and 2 SHOULD BE +1, and between block2 and 3 SHOULD BE +3.

But notice that

Vrel' > -Vrel
+1 is not greater than - (-3)

which means that LCP is wrong.

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633297
• Total Posts
3011247
• ### Who's Online (See full list)

There are no registered users currently online

×