Advertisement

Distance from a line

Started by February 21, 2000 05:42 PM
4 comments, last by dog135 25 years ago
This sounds like it should be simple but I just can''t find it anywhere. I need to know how to figure the distance a point is from a line. I know the x,y of all 3 points. We''ll say one end of the line is at 0,0 (it''s a line segment, but that''s not important) Thanks. E:cb woof!
E:cb woof!
just search for geometry sites on the net.
here are two pages I found:

http://www.swin.edu.au/astronomy/pbourke/geometry/pointline/

http://mathworld.wolfram.com/Point-LineDistance2-D.html

hope they help
Brenden
Advertisement
Thanks, That''s exactly what I needed. I''m going to bookmark it.

E:cb woof!
E:cb woof!
Um, actualy, I do still have a question. In the equation:



What is the meaning of the pipes on the bottom of the equation? I'm sure it has something to do with the fact that P1 and P2 have both an x and y value, but I'm still not sure what they mean. Can someone clarify it for me?

BTW: This equation came from the http://www.swin.edu.au/astronomy/pbourke/geometry/pointline/ link.

E:cb woof!

Edited by - dog135 on 2/21/00 7:53:54 PM
E:cb woof!
It''s refering to the length of the vector p2 - p1.
Ok, thanks, I just programmed that in and it works now.

E:cb woof!
E:cb woof!

This topic is closed to new replies.

Advertisement