Please teach me a mathematical algorithm
The known three-point coordinates p1(x0,y0),p2(x1,y1)p3(x2,y2). The unknown point M(x,y ) to the ratio of three points d1, d2, d3, find the coordinates of the unknown point
Notes: 1. M may not be in the triangle formed by p1, p2, p3. Is there a fixed solution formula? If it is not possible, prepare to go to school to stay.
This is a problem of solving equations. Formulate a system of equations based on known conditions. Express x and y using known conditions. What you get is the formula you want
According to this lemma, you first select $P_1$, $P_2$ and get a trajectory $Gamma_1$; then select $P_2$, $P_3$ and get the second trajectory $Gamma_2$. If $Gamma_1,Gamma_2$ has an intersection point, the intersection point is the desired one.
$$$$
Determine whether a point is within a triangle on a two-dimensional plane
As for finding the ratio from M point to each point, just find the distance to each point.
Solution of quadratic equation in two variables