From: spencer@med.umich.edu (Spencer W. Thomas)
Subject: Re: cylinder and ray
Organization: University of Michigan HSITN
Lines: 17
NNTP-Posting-Host: guraldi.itn.med.umich.edu
In-reply-to: katkere@krusty.eecs.umich.edu's message of Thu, 15 Apr 1993 04:04:23 GMT


Sketch:  Rotate so cylinder axis is || Z axis.

Intersect X/Y projection of line with projected cylinder (similar to,
but easier than, sphere intersection).  Result: no intersection, one
intersection, or two intersections, parameterized along line by t0 and
t1.  Now look at Z, and compute intersections of line with top and
bottom planes of cylinder.  This gives t0' and t1'.  The interval of
intersection is then the bit of the line from [t0,t1] INTERSECT [t0',t1'].

Details left as an exercise for the reader.

=S
--
=Spencer W. Thomas 		|  Info Tech and Networking, B1911 CFOB, 0704
   "Genome Informatician"	|  Univ of Michigan, Ann Arbor, MI 48109
Spencer.W.Thomas@med.umich.edu	|  313-764-8065, FAX 313-764-4133
