Hi,
I need to integrate a function over the volume obtained after the intersection of two spheres in three dimensions.
I can try to divide the volume into tetrahedrons but that is cumbersome.
Will appreciate if anyone can point to some general quadrature rules on spherical caps (is that the right word?).
-John
|
|
0
|
|
|
|
Reply
|
john
|
1/23/2010 10:51:02 PM |
|
"john " <jpb_NOTTHISPART_singh@yahoo.com> wrote in message <hjfugm$b1v$1@fred.mathworks.com>...
> Hi,
>
> I need to integrate a function over the volume obtained after the intersection of two spheres in three dimensions.
> I can try to divide the volume into tetrahedrons but that is cumbersome.
>
> Will appreciate if anyone can point to some general quadrature rules on spherical caps (is that the right word?).
>
> -John
I would break the domain into two pieces.
The intersection of two spheres will be one of
several possibilities.
1. If the center of one sphere lies inside the other.
2. No intersection at all.
3. The two spheres intersect, but the centers are
far enough apart that the intersection can be defined
as a pair of spherical caps, that share a planar face.
The plane must be perpendicular to the line segment
between the two centers.
In case 3, you need to be able to integrate the
function over a pair of spherical caps, and sum.
In case 1, you need to integrate the function over
a single spherical cap, again a cap with a planar
face that cuts through the spheres.
An integration over a spherical cap seems best done
by a transformation to spherical coordinates.
John
|
|
0
|
|
|
|
Reply
|
John
|
1/23/2010 11:43:03 PM
|
|
"John D'Errico" <woodchips@rochester.rr.com> wrote in message <hjg1i7$mn5$1@fred.mathworks.com>...
> "john " <jpb_NOTTHISPART_singh@yahoo.com> wrote in message <hjfugm$b1v$1@fred.mathworks.com>...
> > Hi,
> >
> > I need to integrate a function over the volume obtained after the intersection of two spheres in three dimensions.
> > I can try to divide the volume into tetrahedrons but that is cumbersome.
> >
> > Will appreciate if anyone can point to some general quadrature rules on spherical caps (is that the right word?).
> >
> > -John
>
> I would break the domain into two pieces.
>
> The intersection of two spheres will be one of
> several possibilities.
>
> 1. If the center of one sphere lies inside the other.
>
> 2. No intersection at all.
>
> 3. The two spheres intersect, but the centers are
> far enough apart that the intersection can be defined
> as a pair of spherical caps, that share a planar face.
> The plane must be perpendicular to the line segment
> between the two centers.
>
> In case 3, you need to be able to integrate the
> function over a pair of spherical caps, and sum.
>
> In case 1, you need to integrate the function over
> a single spherical cap, again a cap with a planar
> face that cuts through the spheres.
>
> An integration over a spherical cap seems best done
> by a transformation to spherical coordinates.
>
> John
Sorry, I missed a piece. The first case is also a sum of
two integrals, both over spherical caps.
Regardless, this is basic calc. Don't forget to use the
proper differential term for spherical coordinates.
John
|
|
0
|
|
|
|
Reply
|
John
|
1/23/2010 11:47:02 PM
|
|
Thanks so much for the quick response.
In my case I have all the above three cases. I am not sure about how to go about handling the integration on spherical caps. Can you please elaborate on these basic calculations. Sorry to be a bother...
-John
|
|
0
|
|
|
|
Reply
|
john
|
1/24/2010 12:16:04 AM
|
|
"john " <jpb_NOTTHISPART_singh@yahoo.com> wrote in message <hjg3g3$onb$1@fred.mathworks.com>...
>
>
> Thanks so much for the quick response.
> In my case I have all the above three cases. I am not sure about how to go about handling the integration on spherical caps. Can you please elaborate on these basic calculations. Sorry to be a bother...
>
> -John
I can only suggest the careful reading of a
reference like this:
http://en.wikipedia.org/wiki/Multiple_integral
The volume differential element in spherical
coordinates is
r^2 dr dphi dtheta.
The first trick/task is to determine the plane of
intersection of the spherical surfaces. Here are
the equations of the two planes.
(x - x1)^2 + (y - y1)^2 + (z - z1)^2= r1^2
(x - x2)^2 + (y - y2)^2 + (z - z2)^2= r2^2
Expand, and subtract. Note that the quadratic
unknowns disappear. It gives you the equation
of a plane, if there is a non-null intersection.
Once you have that plane, then rotate/transform
the problem to a simple, standard form. Integrate
over two spherical caps, and sum.
John
|
|
0
|
|
|
|
Reply
|
John
|
1/24/2010 12:42:03 AM
|
|
Thanks again for your link. I am already aware of how to do multiple integrals.
I am looking for an efficient quadrature rules for spherical caps. I am aware of quad rules over tetrahedral, cube, sphere, etc. I was wondering if there are some standard techniques for spherical caps too.
On searching for published papers on google scholar I get links to papers which are too mathematical for me to interpret.
Any pointers on that will be really helpful- or I would welcome any other suggestions which will give me some elegant solution to the problem. Thanks.
|
|
0
|
|
|
|
Reply
|
john
|
1/24/2010 1:22:04 AM
|
|
I see this is an older post, but I found this for an arbitray dimension
http://en.wikipedia.org/wiki/Spherical_cap
Which gives teh answer in terms of a hypergeoemtric ffunction, whihc I was suprised was not included in matlab. I am sure some one has written it though given its importance in mathematics.
|
|
0
|
|
|
|
Reply
|
Joel
|
8/31/2010 8:05:08 PM
|
|
On 10-08-31 03:05 PM, Joel wrote:
> I see this is an older post, but I found this for an arbitray dimension
> http://en.wikipedia.org/wiki/Spherical_cap
>
> Which gives teh answer in terms of a hypergeoemtric ffunction, whihc I
> was suprised was not included in matlab. I am sure some one has written
> it though given its importance in mathematics.
The hypergeometric function is part of the symbolic toolkit.
I do not know of any particular reason why a hypergeometric function with
numeric-only arguments could not be implemented for Matlab, but considering
the infinite summation of pochhammer functions that underlie the
hypergeometric function definition, I'm not sure if the generalized numeric
result could be fast. Some things are done more easily symbolically.
|
|
0
|
|
|
|
Reply
|
Walter
|
8/31/2010 8:24:18 PM
|
|
maybe montecarlo integration would suit your need? It is not fast but easy to do. You may need to multiply the integrand by an on/off function with the value 1 if you are inside the intersection or 0 if you are outside.
Sébastien
"john " <jpb_NOTTHISPART_singh@yahoo.com> wrote in message <hjfugm$b1v$1@fred.mathworks.com>...
> Hi,
>
> I need to integrate a function over the volume obtained after the intersection of two spheres in three dimensions.
> I can try to divide the volume into tetrahedrons but that is cumbersome.
>
> Will appreciate if anyone can point to some general quadrature rules on spherical caps (is that the right word?).
>
> -John
|
|
0
|
|
|
|
Reply
|
Sébastien
|
8/31/2010 9:56:04 PM
|
|
|
8 Replies
899 Views
(page loaded in 0.127 seconds)
|