home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 12257 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  2.1 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!ai-lab!fiber-one!sundar
  2. From: sundar@fiber-one.ai.mit.edu (Sundar Narasimhan)
  3. Newsgroups: comp.graphics
  4. Subject: Re: Shortest distance between two line _segments_
  5. Date: 23 Nov 1992 20:37:10 GMT
  6. Organization: MIT Artificial Intelligence Laboratory
  7. Lines: 28
  8. Sender: sundar@fiber-one (Sundar Narasimhan)
  9. Distribution: world
  10. Message-ID: <1erfdmINNcnq@life.ai.mit.edu>
  11. References: <1992Nov21.000527.21786@zip.eecs.umich.edu> <By2z4D.How@slipknot.rain.com> <1992Nov22.112142.24512@sophia.smith.edu>
  12. Reply-To: sundar@ai.mit.edu
  13. NNTP-Posting-Host: fiber-one.ai.mit.edu
  14.  
  15. In article <1992Nov22.112142.24512@sophia.smith.edu>, orourke@sophia.smith.edu (Joseph O'Rourke) writes:
  16. |> In article <By2z4D.How@slipknot.rain.com> robert@slipknot.rain.com.UUCP (Robert Reed) writes:
  17. |> >In article <1992Nov21.000527.21786@zip.eecs.umich.edu> katkere@engin.umich.edu writes:
  18. |> >|
  19. |> >|The problem I am trying to solve is whether two swept spheres intersect.
  20. |> >
  21. |> >Two spheres intersect if the sum of their radii is greater than or equal to the
  22. |> >distance between their centers.
  23. |> 
  24. |> Perhaps what the original poster means by a swept sphere is the set
  25. |> of points obtained by sweeping a sphere along a line segment, which
  26. |> produces a cylinder with spherical endcaps.
  27. I'd think one can compute this using two independent computations.
  28. Let's say L1 L2 are the two lines. 
  29.  
  30. a. Determine the point P1 on linesegment L1 that is closest to L2.
  31. This can be done very easily if you express the co-ordinates of the
  32. endpoints of L1 in a plane perpendicular to L2, and then find the
  33. point of intersection between this projected segment and a perpendicular 
  34. drawn to it from the origin. (Note that this is a 2-d problem). Let 
  35. this point be Q. Determine the parametric value of Q in [P1 + t(P2-P1)]
  36. and choose one of Q, P1 or P2 depending on whether t is (0,1),<1,>1.
  37.  
  38. b. Determine the point P2 on linesegment L2 that is closest to L1.
  39. (This is just the same as a. but with the arguments transposed).
  40.  
  41. Desired distance = dist(P1,P2).
  42. Proof? You must be kidding! :-)
  43.