Saqib Husain
asked on
Position of a point with respect to a line
Given a point (x,y)
and a line defined by (x1, y1) and (x2, y2)
what is the distance between the point and the line? and
what is the check whether the point lies within the end points?
All in terms of x's and y's for plugging in a computer program.
and a line defined by (x1, y1) and (x2, y2)
what is the distance between the point and the line? and
what is the check whether the point lies within the end points?
All in terms of x's and y's for plugging in a computer program.
ASKER
Yes
ASKER
On a drawing, they are texts written next to lines at a defined distance.
There is a formula for the distance from a point to a line (not a line segment).
http://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
You would have to convert your line segment into the ax + by + c = 0 form.
http://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
You would have to convert your line segment into the ax + by + c = 0 form.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great, thanks. Working perfectly.
Is it a region bounded by lines through (x1, y1) and (x2, y2) perpendicular to the line between (x1, y1) and (x2, y2)?