Sign in to follow this  
flutey

computing contacts using GJK

Recommended Posts

i have been working lately on my GJK implementation i managed to make it running , and it works flawlessly in detecting the collision (boolean) between any 2 arbitrary convex shapes now, as am working in a contact routine inside a rigid body simulator, i need to compute the contacs, i need to know how many contacts,their positions, their penetration depths and the normal to the plane of collision.. i know that when the GJK algorithm converge, i get a tetrahedron enclosing the origin composed of vertices of the minkowski's difference (CSO of the 2 moeshes, i was trying to think of a way to use this tetrahedron, can anybody hint mme about this?

Share this post


Link to post
Share on other sites
Quote:
Original post by flutey
was that this hard..?
Actually, it is kind of hard :-) Based on what you posted though, I'm guessing you might be looking for the 'expanding polytope algorithm'. Google might tell you more, otherwise check out Gino van den Bergen's or Christer Ericson's books (there may be other good references as well, but these are always the two that spring to my mind when GJK is mentioned).

Share this post


Link to post
Share on other sites
Bullet contains a working and free GJK implementation including physics simulator here. The GJK innerloop is from Christer Ericson's book.

It is important to gather more then 1 contact point. For this there is the persistent manifold class, which gathers and updates contact points incrementally (over frames), including position, normal and distance.
It feeds the contacts into an iterative constraint solver. The iterative impulse based method is similar to Erin Catto's GDC 2006 paper (from last week).

http://bullet.sourceforge.net

Erwin

Share this post


Link to post
Share on other sites
thanks, ullet is really powerful...
injecting it with my physics integrator is a bit triky now..
but am going in..
if u have experience with bullet.. where can i set collision backs?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this