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)
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.