Newsgroups: comp.graphics
Path: cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!bb3.andrew.cmu.edu!news.sei.cmu.edu!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!news-feed-1.peachnet.edu!umn.edu!umeecs!krusty.eecs.umich.edu!katkere
From: katkere@krusty.eecs.umich.edu (Arun Katkere)
Subject: Re: cylinder and ray
Message-ID: <1993Apr15.040423.3889@zip.eecs.umich.edu>
Sender: news@zip.eecs.umich.edu (Mr. News)
Reply-To: katkere@engin.umich.edu
Organization: University of Michigan EECS Dept., Ann Arbor, MI
References:  <1qc1fgINNbv4@darkstar.UCSC.EDU>
Date: Thu, 15 Apr 1993 04:04:23 GMT
Lines: 19

In article <1qc1fgINNbv4@darkstar.UCSC.EDU>, koehler@secs.ucsc.edu writes:
|> I would be most thrilled if some kind person could help me with the following
|> Given a cylinder in 3D -defined as a line segment between two points and
|> a radius (e.g. Sx,Sy,Sz to Ex,Ey,Ez and r), what is the easiest (and not
|> too expensive) way to find if a ray -defined as another line through two
|> points -cuts through this cylinder and if so where? 

|> I think the test for touching is rather simple: if the closest approach
|> of the two lines is less than r, then the ray does penetrate the cylinder.

Nope, this won't work for a cylinder. You can have a line arbitrarily close
to the the cylinder backbone, and yet not intersect it. The test works for a
pillbox, though. (a cylinder with two hemispheres attached at the ends.)

|> Thanks,
|> 	Ryan 	(koehler@secs.ucsc.edu)

-arun
-- 
