|
|
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
|
|