Calculate Intersection point of 2 Lines with angle

569 Views Asked by At

I would like to calculate an intersection point of two lines in a 2D area. I think it should be really simple but i cannot figure it out.

I have two points P1(x,y), P2(x,y) and 2 angles alpha and beta. I know all 4 values and I would like to calculate the Intersection Point I out of it. I cannot add picutres now but the link is below. Hope you can help me out (picture here)

2

There are 2 best solutions below

0
On

You can use the slope-point form - to figure out the point of intersection.

The first step is to deduce the equations of the two lines. The slope of the first line is tan(90 + $\alpha$) == - cot$\alpha$ . So the equation of the first line is $y - P_{1,y} = - cot\alpha(x - P_{1,x})$. Similarly, the equation of the second line is $y - P_{2,y} = -tan\beta(x - P_{2,x})$.

Then you can easily calculate the point of intersection by solving the two equations simultaneously.

0
On

Hint

Solve for the two unknowns from their equations

$$ \frac{y-y_1}{x-x_1}=-\cot \alpha $$ $$ \frac{y-y_2}{x-x_2}=-\tan \beta $$