home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!tim
- From: tim@cs.monash.edu.au (Tim Shimmin)
- Subject: Re: Quickest way to calculate the distance between a point and a line
- Message-ID: <tim.722071286@bruce.cs.monash.edu.au>
- Sender: news@bruce.cs.monash.edu.au (USENET News System)
- Organization: Computer Science, Monash University, Australia
- References: <BxML0r.II@vuse.vanderbilt.edu> <1dur1oINNede@fido.asd.sgi.com>
- Date: Wed, 18 Nov 1992 07:21:26 GMT
- Lines: 19
-
- One way to find the distance between a point and a straight line can be
- found in: Foley et al,"Computer Graphics: Principles and Practice" 2nd
- Ed., 1990, p1100.
- It is rather simple & uses one parameter t and dot-product.
-
- If one needs to calculate the distance quickly and is willing to accept
- a possible error between 3.5%-5%, then there is an approx. equation
- which does not require any squaring. This can be found in:
- Foley et al,"Fundamentals of Interactive Computer Graphics" 1st Ed. 1982,
- p203
- and also in Pizer, S., "Numerical Computing and Mathematical Analysis",
- SRA, 1975.
-
- Tim Shimmin.
- --
- ------------------------------------------------------------------------
- Name: Tim Shimmin
- Net Address: tim@bruce.cs.monash.edu.au
- Occupation: Masters Degree Student
-