N e a r e s t S i m p l e x ( s ) {\displaystyle \mathrm {NearestSimplex} (s)} , 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.