My question is the following
How can I get point $(x_3, y_3)$ from points $(x_1, y_1)$ and $(x_2, y_2)$ ?
The distance of point $(x_3, y_3)$ from $(x_1, y_1)$ is $300$.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.Sign up to join this community
and the distance "d", in the case with the value of 300 units
d = 300
you can define a vector (namely "u") pointing from P1 to P2, using vector subtraction:
u = P2 - P1
(in the way that P2 = P1 + u)
then, you can normalize "u" making it unit norm, we can name that vector "v"
norm(u) = (ux^2+uy^2)^0.5
to obtain the third point (namely P3), you need just to sum a vector with the direction from P1 to P2 with the norm equal to the distance (in case 300 units), in our notation:
P3 = P1 + v * d
Thanks to the illustration, we now that the direction is from P1 to P2. But remember, that only given the distance, are two solutions: the above and with -v (300 units from P1 in the direction from P2 to P1).
That solution is valid for a euclidean space with any number of dimensions (changes only the number of components to normalize and the number of elements to calculate the norm).