home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!hri.com!noc.near.net!nic.umass.edu!caen!zaphod.mps.ohio-state.edu!darwin.sura.net!news.Vanderbilt.Edu!vuse.vanderbilt.edu!se.vanderbilt.edu!brandon
- From: brandon@se.vanderbilt.edu (Brandon S. Dewberry)
- Newsgroups: comp.graphics
- Subject: Quickest way to calculate the distance between a point and a line
- Keywords: analytic geometry
- Message-ID: <BxML0r.II@vuse.vanderbilt.edu>
- Date: 12 Nov 92 22:55:38 GMT
- Sender: news@vuse.vanderbilt.edu
- Reply-To: brandon@se.vanderbilt.edu(Brandon S. Dewberry)
- Organization: Vanderbilt University
- Lines: 20
- Nntp-Posting-Host: vvcs
-
- Hi, I've checked the FAQ and can't find this one, even though its quite basic.
-
- I'm developing a dynamic graphic simulation, and I need advice on the subject.
- I have many circles, all the same radius, flowing down a channel
- (in the future they will be spheres in a tube.)
-
- I need the quickest algorithm for calculating the distance between a
- point (x,y) and a line f(x). I will have an initial distance which will be updated at
- each major time slice.
-
- The straightforward way is iteratively better guesses until the perpendicular
- is found which passes through (x,y). Is there a quicker way? I need to check
- many of these and want the quickest algorithm.
-
- Does anyone have a reference?
-
- Brandon
- --
- Brandon S. Dewberry Biomedical Engineering Department
- brandon@vuse.vanderbilt.edu Vanderbilt University
-