Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Triangulation using sphere intersects
Date: Fri, 3 Apr 2009 23:01:12 +0000 (UTC)
Organization: University of Puerto Rico, Mayaguez Campus
Lines: 33
Message-ID: <gr64fo$sc8$1@fred.mathworks.com>
References: <gg5tb3$ms3$1@fred.mathworks.com> <gg7ep2$dg$1@fred.mathworks.com> <gg7ibf$iq3$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1238799672 29064 172.30.248.35 (3 Apr 2009 23:01:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 3 Apr 2009 23:01:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1787678
Xref: news.mathworks.com comp.soft-sys.matlab:530204


"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gg7ibf$iq3$1@fred.mathworks.com>...
> "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gg7ep2$dg$1@fred.mathworks.com>...
> > .......
> >  Then solve for the plane which contains all three centers.
> > .......
> 
>   It occurs to me that I might have taken too large a step when I said to find the equation of the plane through the three sphere centers.  To give that step in greater detail, let C1 = [x1;y1;z1], C2 = [x2;y2;z2], and C3 = [x3;y3;z3] be the three centers.  Then the cross product, cross(C2-C1,C3-C1), must be orthogonal to the desired plane.  Hence any point on the plane P = (x,y,z) must satisfy
> 
>  dot(P-C1,cross(C2-C1,C3-C1)) =
>  (x-x1)*((y2-y1)*(z3-z1)-(y3-y1)*(z2-z1)) +
>  (y-y1)*((z2-z1)*(x3-x1)-(z3-z1)*(x2-x1)) +
>  (z-z1)*((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1)) = 0
> 
> which gives the equation of that plane.
> 
> Roger Stafford
Greetings Roger
I have followed the steps you specified in this forum to compute the intersection of three spheres. However, I got stuck with some instructions. 
In order to finally produce the intercept coordinate points, a line equation must be implemented. This line must contain L (point of interception of the three specified planes) and should be orthogonal to the plane containing the 3 sphere centers. The definition of a line equation is:
<x,y,z> = <x0, y0,z0> + t*<Vx, Vy, Vz>
where <x0, y0, z0> refers to a point in the line, and <Vx, Vy,Vz> refers to a vector parallel to it. The way  I figure, if I have this equation defined, I could use it along with L, the computed distance (d) from L to the point of sphere intersection (obtained using Pythagoras theorem), and the distance formula to determine the point of interest:
d^2 = [(x-Lx)^2 + (y-Ly)^2 + (z-Lz)^2].
if (x,y,z) lies along the same line as L, then:
d^2 = [(Lx + tVx-Lx)^2 + (Ly + tVy -Ly)^2 + (Lz - tVz-Lz)^2]
All I would have to do then is to solve for t. Then, the point of interception would be obtained using the Line equation.
It seems dandy and all, but I have a little problem with this. I just do not know how I could obtain the vector needed to define the Line Equation. So, this leads me to the following questions:
Is the approach I have mentioned over here appropriate? If so, what am I doing wrong? What am I missing? Is there a way I could obtain such a vector?
Is there something I could do instead of using the previously mentioned?
I would appreciate if you could help me out with this.

regards, Ricardo
Thanks
<x0, y0, z0> would be L. But I am