Prev: Re: [FT] [computer] 3D math Next: Re:First CanAm

Re: [FT] [computer] 3D math

From: Nyrath the nearly wise <nyrath@c...>
Date: Wed, 06 Sep 2000 21:47:13 -0400
Subject: Re: [FT] [computer] 3D math

"Barclay, Tom" wrote:
> - in 3 space
> - a sphere we shall call S1 located at coorinates (x1,y1,z1) of radius
r1.
> - a sphere we shall call S2 located at coorinates (x2,y2,z2) of radius
r2.
> - a point we shall call P3 located at coordinates (x3,y3,z3).
> 
> A) Do r1 and r2 intersect one another? What formula will determine
this?
> <My guess: Take a line between the centre of S1 and S2 and determine
if the
> length of this segment exceeds the sum of the radii r1 and r2>.

	Yes, that's my take on it. Use the true distance formula.

	d = sqrt( (x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2 )
where:
d	= distance between the centers of the spheres
sqrt(X) = square root of X
(x)^2	= square of x

	S1 and S2 intersect each other if
	d < (r1 + r2)

> B) What percentage of the volume of S2 is contained within S1? What
formula
> will determine this?

	You're on your own on this one.  My calculus is weak.

> B) Is point P3 within sphere S1?

	Same as A).  Use x1,y1,z1 and x3,y3,z3 in the true
	distance formula.
	Point P3 is inside sphere S1 if 
	d < r1


Prev: Re: [FT] [computer] 3D math Next: Re:First CanAm