Given three points, how would one approximate the best positive weights
(u, v, w) such that
u+v+w = 1, and that the distance between the new
u*p0 + v*p1 + w*p2 from
p3 is minimal?
Basically, the player's unit is between several enemy bases in (3d) space and it is easy to tell which is closest or even find the "weights" between two bases
(t, 1-t) to describe the relative how the players influence is spread. How does one find the optimal weights for three or more surrounding points?