How to find contact point from EPA (Expanding Polytope Algo)

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
janzdott
Posts: 2
Joined: Tue Nov 12, 2013 8:59 pm

How to find contact point from EPA (Expanding Polytope Algo)

Post by janzdott »

Hello. I took physics and AP physics in high school, and I was always very interested in it. I also love programming. Put those things together, and you've got someone who wants to write a physics engine! :D I have implemented GJK and EPA into my engine, and both of them work flawlessly. I have been unable to create a test case where either of the algorithms fail. Now I am able to determine if objects are colliding, what the penetration depth is, and what the contact normal is.

The one thing that is unclear to me is, how do I find the contact point from EPA? Gino's paper explains it, but I don't fully understand what I have to do. http://www.win.tue.nl/~gino/solid/gdc2001depth.pdf Each lambda is a vertex weight, correct? Then you can express v in terms of each point in the polyhedron and their respective weights? Gino also explains how you solve for the lambdas by building a huge matrix and computing the inverse of it. I don't understand how this works. :? Would anyone be able to explain this to me?

Edit: I figured it out. I'm using a different closest point on triangle algorithm, which determines barycentric coordinates. Then all you need to find the contact points are the barycentric coordinates of the final triangle, along with the support points that formed that triangle.
Post Reply