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


Need a quickie algorithm

Recommended Posts

Goodlife    122
Hey all, I need a quickie algorithm-- I had this algorithm in the past, but destroyed my source code at some point. Now I don''t remember how I did it!!! I''m looking for the distance from a point to an infinite line. So, for instance, I''d have a point defined by POINT and a line defined by two POINTs, and I need to get the distance from the point to the line. It doesn''t need to clip at the endpoints or anything-- just the distance from the specified point to the specified line (whose slope and position is defined by two points). Essentially, I need the length of a line segment that is perpendicular to the line, and has one endpoint on the line, and one endpoint at my specified point. Thanks in advance! Goodlife

Share this post

Link to post
Share on other sites