home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!seas.gwu.edu!ilan
- From: ilan@seas.gwu.edu (Ilan Berkner)
- Subject: Need: prpndcular dist from pt to line
- Message-ID: <1992Dec29.210554.5350@seas.gwu.edu>
- Sender: news@seas.gwu.edu
- Organization: George Washington University
- Date: Tue, 29 Dec 1992 21:05:54 GMT
- Lines: 14
-
-
- Given a line, or line segment (I can do both), I need to find the
- distance from a point (that may or may not be on the line) to that line.
- If the point is on the line, then the distance is zero, obviously.
-
- I know the endpoints of the line segment in cartesian space, and I also
- know the slope and intercept, and the coordinates of the point.
-
- This is for a computer application, so anything involving integer math
- is preferable to floating-point.
-
- Thanx very much in advance. I know this is almost a trivial problem
- for all you math geniuses out there, but I also want to make sure that
- whatever solution I get, is also the best.
-