Distance-function barycentric map (source code)

= Distance-function barycentric map

Let closed <subsets> $F_0,F_1,F_2$ of a <triangle> have \b[empty common <intersection>]. Their <distance functions> $d_i(x)=\operatorname{dist}(x,F_i)$ have positive sum at every <point>, so
$$
g_i(x)=\frac{d_i(x)}{d_0(x)+d_1(x)+d_2(x)}
$$
are <continuous> <barycentric coordinates>. If one $F_i$ is empty it may be assigned the constant positive function one instead. The denominator condition is essential; the formula is undefined on a common <intersection>.

If the $F_i$ cover the <triangle>, at least one $d_i(x)$ vanishes everywhere, placing $g(x)$ on its <boundary>. If $F_i$ also contains the side opposite the $i$th <vertex>, then $g_i=0$ on that side: the map carries each side into itself. The <no-retraction covering principle> rules out this boundary-valued <continuous map>, proving the <triangle KKM lemma>.