Calculate possible intersection point of two lines

954 Views Asked by At

I'd like to know the $I$ coordinates $[x, y]$. $I$ is the possible intersection point of line $|AB|$ with $|XY|$ and $|X'Y'|$. Values that are known:

  • Angle $AIX$ and $AIX'$
  • Coordinates of points $A$, $B$, $X$, $Y$, $X'$, $Y'$

I have no idea how to calculate intersection point of two lines that do not directly intersect.

Thanks a lot in advance.

PS: Gray lines are imaginary

1

There are 1 best solutions below

6
On BEST ANSWER

Given the coordinates $(x,y)$ of your four points $A,B,X,Y$, the parametrized equations for the two continuation lines are

$$\vec{r}_1(t) =\begin{bmatrix}x_A \\ y_A \end{bmatrix} +t\cdot\begin{bmatrix}x_B-x_A \\ y_B-y_A \end{bmatrix},$$

$$\vec{r}_2(s) =\begin{bmatrix}x_X \\ y_X \end{bmatrix} +s\cdot\begin{bmatrix}x_Y-x_X \\ y_Y-y_X \end{bmatrix}.$$

Set $\vec{r}_1(t)=\vec{r}_2(s)$ and solve for the parameters $(s_0,t_0)$. Putting the parameter value into the above equations tells you the intersection point, e.g. $$\vec{r}_I=\vec{r}_1(t_0),\qquad \text{or}\qquad \vec{r}_I=\vec{r}_2(s_0).$$

EDIT Assume for example the positions $$A:(0,1),\quad B:(0,2),\quad X:(1,1),\quad Y:(2,2)$$ (which is a bit similar to your picture)

Then the line-equations are

$$\vec{r}_1 (t) =\begin{bmatrix}0 \\ t \end{bmatrix},\qquad \vec{r}_2(s)=\begin{bmatrix}1+s \\ 1+s \end{bmatrix}.$$

Setting them equal gives the set of equations

$$0=1+s,\\t=1+s,$$

with the solution $(s_0,t_0)=(-1,0)$. Computing your intersection point as explained above, you obtain $$\vec{r}_I = \vec{r}_1(0)=\begin{bmatrix}0 \\ 0 \end{bmatrix}.$$