home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 12013 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.3 KB  |  31 lines

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