Initialising the simplex set in GJK

Started by
2 comments, last by Dirk Gregorius 15 years, 8 months ago
Hi, I currently looking at the GJK algorithm and how it works, using Christer Ericson's slides for SIGGRAPH 2004 and I am not totally sure how the first step works (which involves initialising the simplex set with up to d+1 points within a convex hull). My main question then is how are you supposed to determine what vertices on a convex hull will be used to create the intitial simplex, can just randomly selecting point(s) work or is there a specific method for constructing a simplex from a convex hull, or is there something I have misunderstood/missed? Thanks.
Advertisement
I generally use a single point for the initial simplex- the difference of the objects' center points. It is possible to start with a full simplex, though if I'm not mistaken, to do that you'd generally be using the final simplex of an earlier run of the algorithm to warm start it.

I have not dealt with warm starting GJK extensively, but I've found that circumstances usually change enough between multiple runs that allowing for warm starting wasn't worth it. Someone else may have more experience here.
I'd do what Norbo says.

Also, you can start off using the relative position between the two convexes as your first potential SAT. That will give you your first point for your simplex.

And yes, you can cache the simplexes between two objects if you want to use time coherence.

Everything is better with Metal.

Does GJK behave differently (numerically more robust) for different strategies when initializing the simplex? I got better results with using the zero vector as initial search direction instead of using the difference of the centroids. Might be just accidental, but I wonder if anybody made similar observations?


This topic is closed to new replies.

Advertisement