# Initialising the simplex set in GJK

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

## Recommended Posts

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.

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
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?

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

• 35
• 23
• 13
• 13
• 17
• ### Forum Statistics

• Total Topics
631702
• Total Posts
3001812
×