POV-Ray : Newsgroups : povray.general : Brsuhing up on math - intersection sphere-cylinder : Re: Brsuhing up on math - intersection sphere-cylinder Server Time
8 Aug 2024 10:26:53 EDT (-0400)
  Re: Brsuhing up on math - intersection sphere-cylinder  
From: Remco de Korte
Date: 9 Jan 2001 05:23:27
Message: <3A5AE5D8.598A35AE@onwijs.com>
David Fontaine wrote:
> 
> Remco de Korte wrote:
> 
> > I know there are many of you for whom this is daily stuff, so perhaps someone
> > can help me with this:
> >
> > If I have a sphere with radius 1 intersected by a cylinder with radius .5, with
> > an axis in the z-direction through point <.75,0> how can I calculate the points
> > on the curve where these two intersect?
> > The values are arbitrary and I know there are several ways to calculate both
> > objects and that you should cross these two some way but I get very weird
> > looking results and I'm convinced it should be something simple (or at least I
> > hope).
> 
> Assuming <.75,0> means <.75,0,0>:

Yes, of course :)

> 
> x^2 + y^2 + z^2 = 1   <-> x^2 + y^2 + z^2        - 1      = 0
> (x-.75)^2 + y^2 = .25 <-> x^2 + y^2       - 1.5x + .3125  = 0
>                           -----------------------------------
>                                       z^2 + 1.5x - 1.3125 = 0
> 
> I think...
> 

That's (similar to) what I found. Now to get that into some traceable code...

Thanks,

Remco 

> --
> David Fontaine  <dav### [at] faricynet>  ICQ 55354965
> My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.