Find 2 points defined by another point and two vectors

30 Views Asked by At

This is my scenario:
(More info after the image)

My scenario

Let me first point out that I am coming from a programer background and for me vectors are defined using two numbers: $x$ and $y$. For example: A unit vector in a 2D system pointing to the right is defined as: $(1, 0)$. That being said I might be a little slow in understanding your approach when you provide a solution that uses a physics formula. Whatever...

In short
Given: $A_1, A_2, B_1, B_2, E$;
Looking for: $X, Y$.

More detailed:
Alright, consider $E$ to be a point that moves from somewhere on $A_1A_2$ to somewhere on $B_1B_2$. $E$ doesn't have to start/end on those vectors, it has to start/end on the infinite lines that are defined by those two vectors. However, it is guaranteed that $E$ can be found within the cone defined by $A_1A_2$ and $B_1B_2$. In my drawing it just so happens that E travels from $X$ to $Y$ (Wich both are defined on the vectors). I am looking for the fraction that defines the progress that $E$ has made to travel from $X$ to $Y$.

For the creative
If you think my approach is stupid and there is a much better solution -> I'd love to hear it :)

Another approach (EDIT)
Description below image

Another approach

I was just looking for easier solutions and came up with this one. I believe the fraction can be found as follows:

$p = a + b - c$
$q = y + z - x$
$fraction = 1 / (p + q) * p$

I will verify if this works now...
EDIT2: This approach doesn't work. First, the four angles which are connected to $c$ and $x$ would have to be restricted to be less or equal to 90 deg. But that still causes problems. Maybe because $x$ and $c$ would be required to have the same lenght. Or maybe because the approach just fails in general.