How do I get the start and endpoint of a line using the middle point and the angle?

173 Views Asked by At

I have a line that goes from P1 to P2 in a 2D space. I have the location of the middle point of that line, and the angle of inclination of the line. The thing is that I don't know the length of the line. Is it possible to find the location of the origin point?

Many Thanks!

1

There are 1 best solutions below

4
On BEST ANSWER

No. There are many lines with the same inclination and the same middle point, so this is not a sufficient amount of information ; you need one more information to be able to compute the end points.

As an example, the segments between the points $(-x,0)$ and $(x,0)$ for $x > 0$ all have midpoint at $(0,0)$ and inclination of 0 degrees.

Hope that helps,