Content deleted Content added
m →Overview: \mathrm, {{mvar}} |
m Added link from "tetrahedron" (using and ) |
||
Line 14:
* <math>\mathrm{NearestSimplex}(s)</math>, which takes a simplex {{mvar|s}} and returns the simplex on {{mvar|s}} closest to the origin, and a direction toward the origin normal to the new simplex. If {{mvar|s}} itself contains the origin, {{math|NearestSimplex}} accepts {{mvar|s}} and the two shapes are determined to intersect.
The simplices handled by {{math|NearestSimplex}} 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 ===
|