#### Archived

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

# 2d math question

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

## 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 on other sites
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.

1. 1
2. 2
3. 3
4. 4
Rutin
16
5. 5

• 14
• 9
• 9
• 9
• 10
• ### Forum Statistics

• Total Topics
632913
• Total Posts
3009189
• ### Who's Online (See full list)

There are no registered users currently online

×