Gilbert–Johnson–Keerthi distance algorithm: Difference between revisions

Content deleted Content added
Timrb (talk | contribs)
Overview: fix pseudocode
Kingding (talk | contribs)
fix typo
Line 14:
* <math>NearestSimplex(s)</math>, which takes a simplex <math>s</math> and returns the simplex on <math>s</math> closest to the origin, and a direction toward the origin normal to the new simplex. If <math>s</math> itself contains the origin, <math>NearestSimplex</math> accepts <math>s</math> and the two shapes are determined to intersect.
 
The simpleciessimplices handled by <math>NearestSimplex</math> may each be any simplex sub-space of {{math|'''R'''<sup>''n''</sup>}}. For example in 3D, they may be a point, a line segment, a triangle, or a tetrahedron; each defined by 1, 2, 3, or 4 points respectively.
 
=== Pseudocode ===