I have three points. $P_1(x_1,y_1)$ and $P_2(x_2,y_2)$ and $P_3(x_3,y_3)$ and I am looking for $P_4(x_4,y_4)$.
$P_1$ and $P_2$ are on the same line as $P_4$. I have a known distance along the line which I will call $D_1$. $P_4$ is a distance of $D_1 * T$ away from $P_1$ along this line.
$P_3$ is on the same line as $P_4$, but not the same line as $P_1$ and $P_2$. I have a known distance along this line which is $D_2$. $P_4$ is a distance of $D_2 * T$ away from $P_3$ along this unknown line.
$T$ is an unknown multiplier that is the same for both $D_1$ and $D_2$ to reach $P_4$.
$D_1$ is also known as a direction vector where $D_2$ is only known as a distance.
If someone is able to help me find $P_4$, it would be greatly appreciated.
P1, P2 and P4 are all on a straight line, as in if you draw a line from P1 to P4, it will also pass through P2.
P3 and P4 also form a straight line where P4 is D2 * T away from P4.
D1 is a distance which is also known as a direction vector because it is along the straight line which includes P1, P2 and P4. As in P2 - P1 is a direction vector D1 and Pythagorean theorem lets us find the distance of said vector. I was just trying to give available information for whichever would be most useful.
This is what I have tried, although it is basic and only works when the distance from P3 to P4 is equal to the distance from P3 to P1. Also of note, D1 is used in its vector form.
P4 = P1 + D1 * |P1-P3| / D2
And this works perfectly when |P1-P3| = |P4-P3| but that only covers a very small range of possible scenarios.
Thanks for looking!