# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: step after closest point detection??Posted: Sat Jan 28, 2006 9:21 am

Joined: Sat Jan 28, 2006 9:07 am
Posts: 3
Hello (sorry for my bad english )

I m a beginner who try to make a simple simulator in physic (just with impulsion for the moment)

I ve implemented the algorithm of Vclip, it works fine and returns me the closest feature beetween two Object

With this two features i've got the closest points and the normal .

But the probem is that i ve just one contact point with this method.

So my problem is how to find all the contact point knowing the closest features??

I ve an idea but im not very sure:
_Compute the 2 convex hull(in 2D) of the point which are on" the separating plane"

_And Compute the intersection of this two convex hull

Can you tell me what to do , a paper ,an another way to do this ..

Thank you

Top

 Post subject: Posted: Sat Jan 28, 2006 5:12 pm

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 4050
Location: California, USA
There are roughly 2 different ways you can tackle the contact manifold generation: incrementally, or at once.

For incrementally:
Basically you need a couple of things:

every collision step:

1) calculate a new closest point (vclip, or other algo like gjk)

2) check if this point is already in the contact cache.
2a) If you keep track of feature-id's, you can do this very efficient.y.
2b) Otherwise use the worldspace distance to check for equality (with a treshold).

3a) if the point exists do nothing
3b) if it is a new point, add it to the contact cache. preferably in local coordinates of both rigidbodies/shapes.

4) if the contact cache exceed some upper size, reduce.
4a) keep the point with the deepest penetration
4b) build some kind of heuristic to choose the points that approximate the 2d convex hull best.

5) after each integration, refresh the contact cache:
5a) calculate 2 new worldspace coordinates for each contact point, using the local coordinates in body A and body B, and the new transforms of each body.

5b) check if the contact is still valid, similar to using (2b).

You can see the sample implementation here:
http://www.continuousphysics.com/Bullet ... ource.html

There is some extra heuristic for step 4b and 5b in this implementation.
4b: quick appriximation by using triangle with biggest area
5b) take the projection onto the normal into account, so even when the distance between the two projections into worldspace exceed the maximum distance treshold, you keep it. This will allow to keep points that cause deeper penetrations. They still break on motion in the contact plane, orthogonal to the normal.

There is also a paper by Adam and Pierre from Novodex with some variations on this theme:
http://www.continuousphysics.com/ftp/pu ... draft9.doc

For 'at once', which only works if you got feature information like planes, vertices, edges (not for implicit shapes like sphere, cylinders etc).
I won't explain too much about this case. ODE uses this for box-box for example, but you can generalize this for convex-convex polyhedra.
You can find the two polygons that share the closest point, and that are most parallel (some heuristic here). Then clip all triangles from one polyhedron on this plane, and on the other polygons edges.

Top

 Post subject: Posted: Sun Jan 29, 2006 9:43 am

Joined: Sat Jan 28, 2006 9:07 am
Posts: 3

I ll try to do what you say

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Bing [Bot] and 25 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities