POV-Ray : Newsgroups : povray.general : Intersection of three spheres? : Re: Intersection of three spheres? Server Time
8 Aug 2024 20:26:37 EDT (-0400)
  Re: Intersection of three spheres?  
From: Ken Matassa
Date: 20 Oct 2000 00:11:32
Message: <39EFC2A1.7B79@pacbell.net>
Christoph Hormann wrote:
> 
> "Greg M. Johnson" wrote:
> >
> > As I think about it the five possible cases are:
> >     no intersection
> >     1 pt
> >     2 pts
> >     a circle
> >     a sphere
> >
> > For my application at hand, I am interested in the 2 pt scenario, if that
> > makes the answer easier for anyone to find, thanks.
> >
> 
> I'm not so sure, it has been some time, since i did that kind of math stuff, but
> the general equation of a sphere is:
> 
>  ( x - xm )^2 + ( y - ym )^2 + ( z - zm )^2 - r^2 = 0
> 
> with <xm, ym, zm> the center of the sphere and r the radius.
> 
> Make it 3 different spheres and all equations being zero -> you should get the
> result.
> 
> (I'm not totally sure about this, so feel free to correct me if there is a
> mistake)
> 
> BTW, i suspect this does not solve your problem, because it's not a numerical
> method, but maybe it helps somehow.
> 
> Christoph
> 
> --
> Christoph Hormann <chr### [at] gmxde>
> Homepage: http://www.schunter.etc.tu-bs.de/~chris/

You're on the right track.

You need three equations in three unknowns: ( In VERY general terms!)

a(x1)^2 + b(y1)^2 + c(z1)^2 = 0
d(x2)^2 + e(y2)^2 + f(z2)^2 = 0
g(x3)^2 + h(y3)^2 + i(z3)^2 = 0

You now simultainously solve the three equations. If they are liniarly
independent the there will be 2 uneque salutions, the points of
intersection. Now there is a gotch in this. I know how to do this with
liniar equations, BUT, I don't know if it can be donw like this with
quadratic equations. Probubly have to look in an advanced math textbook.
I don'e recall second or higher order equations being covered in my
liniar algebera course.

Ken Matassa


Post a reply to this message

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