[Math] Weight of a point based on it’s distance from other weighted points

geometry

I struggle solving the following:

My Problem:

I have n points in a 2D space, I attribute a weight to each of those. So each point can be defined as having x,y coordinates and a weight, w.

I now create another point, Pu ,for which I do not know the weight, but I do know it's coordinates.

I would like to find the weight of Pu so that the closer it is to another point the closer the weight of Pu is to that point.

Eg: I have three points (x1,y1,w1), (x2,y2,w2) , (x3,y3,w3) and I want to find the weight of (xu ,yu ,wu).

enter image description here

So here I expect the value of wu to be closer to w3 than w1 than w2.

So far the closest I got to is:

Total distance = sum of the distances between point u and each other point:
$d_t = d_{u1} + d_{u2} + d_{u3}$

The sum of the inverse of the distance ratios:
$c_t = \frac{1}{d_{u1}/ d_t} + \frac{1}{d_{u2}/ d_t} + \frac{1}{d_{u3}/ d_t}$

$c_t = d_t*(\frac{1}{d_{u1}}+ \frac{1}{d_{u2}}+ \frac{1}{d_{u3}})$

the weight of point u:
$w_u = w_1*\frac{1}{(d_{u1}/ d_t)/c_t} + w_2*\frac{1}{(d_{u2}/ d_t)/c_t} + w_3*\frac{1}{(d_{u3}/ d_t)/c_t}$

$w_u = w_1*\frac{c_t}{d_{u1}/ d_t} + w_2*\frac{c_t}{d_{u2}/ d_t} + w_3*\frac{c_t}{d_{u3}/ d_t}$

Best Answer

If you want the weight of point $Pu$ to be an average of $w_k$ weighted by $r_k=1/d_{uk}$, then you can simply define $$ w_u={w_1r_1+w_2r_2+w_3r_3+\ldots\over r_1+r_2+r_3+\ldots}. $$

Related Question