Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Which is the function of the gjk function?


Asked by Ailani Melton on Dec 04, 2021 FAQ



GJK relies on two functions: . , which takes a simplex s and returns the simplex on s closest to the origin, and a direction toward the origin normal to the new simplex. If s itself contains the origin, NearestSimplex accepts s and the two shapes are determined to intersect.
Similarly,
The key to using GJK is to be able to compute the point on each object A and B that lies farthest along a search direction. I said earlier that although the Minkowski object is composed of all possible combination of points, we can solve GJK using only the vertices of of our polygons.
Besides, The last installment talked about the GJK algorithm as it pertains to collision detection. The original algorithm actually is used to obtain the distance and closest points between two convex shapes. The algorithm uses much of the same concepts to determine the distance between the shapes.
One may also ask,
For GJK in 3D, not only can the simplex reduction phase end up with a point or a line segment, it can also end up with a triangle due to the one extra dimension compared to 2D. GJK only tells us whether two shapes collide (it essentially returns true or false ).
In respect to this,
Here’s GJK in its entirety: Initialze simplex to empty set (-1D simplex, technically). Use an initial direction to find a support point of the CSO. Add that support point to simplex (now the simplex has a single vertex). Find the closest point in the simplex to the origin.