I have a line L specified by (x1,y1)(x2,y2) and want to calculate the coordinates of the point that is:
- located on the normal that intersects L at the half of its length
- is a certain distance D away from L
Examples:
- If the line is (x1,a)(x2,a) (horizontal) the coordinates of the calculated point would be ((x2-x1)/2,D).
- If the line is (a,y1)(a,y2) (vertical) the coordinates of the calculated point would be (D, (y2-y1)/2).
But i dont know how to calculate the coordinates in a generic way for all lines regardless of the angle (-Pi to Pi).
Thanks in advance!