Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

2d math question

This topic is 6600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For simplicity I'm going to assume that x1, y1 is at the origin (0, 0). Then the vector defining your line segment is (x2, y2). From algebra we know that the inverse of a slope m is -1/m, and since the slope of our line is y2/x2 we know that -x2/y2 is the slope of the perpendicular line. This means that (-y2, x2) is the vector defining the perpendicular line segment.

So for a specific example, let the endpoints be (1, 1) and (2, 3). So the vector defining your line is (1, 2) (which is (2, 3) - (1, 1) btw). The vector defining the perpendicular line is then (-2, 1), so the endpoint that you are looking for is (1, 1) + (-2, 1) = (-1, 2).

I hope this helps and please try to refrain from posting the same message on multiple boards.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Say you have an arbitrary line in 2d space with endpoints x1,y1 and x2,y2. Is there a computationally efficient way that I can calculate the endpoint of a line
of length (L) perpendicular to the line defined by endpoints x1,y1 and x2,y2.

Your help is greatly appreciated. If at all possible, can someone give me a detailed answer with example.

Share this post


Link to post
Share on other sites