How to determine volume within intersecting spheres

14 views (last 30 days)
Hi,
I was wondering how to determine the volume of two or more intersecting spheres? When 2 spheres intersect, there are formulas that can help finding the volume inside the two spheres. But when there are three or more, the common spaces become so complicated. It would be great if there was a way to determine the internal volume of the intersection of the spheres eliminating all the internal surfaces and calculating the volume confined in the outer surfaces of the spheres.
The purpose would be to determine an equivalent sphere with the volume equal to the volume of these bodies together.
For example, in the figure below, how to determine the volume inside the shape limited to the outer surfaces of the sphere knowing the coordinates of the spheres and their radii.
Thank you.

Answers (2)

Torsten
Torsten on 22 May 2015
The method that comes to mind is Monte-Carlo simulation:
Choose a box that contains all spheres you want to consider.
Generate a vector of random points uniformly distributed within the box.
Check which of the random points are within the volume of intersection.
If N is the total number of points generated and N_I is the number of points within the volume of intersection, then the volume of intersection is approximately
N_I/N * (Volume of the box).
I don't know how many random points you will need to get a good approximation to the volume of intersection, but it's worth a try.
Best wishes
Torsten.
  1 Comment
Torsten
Torsten on 22 May 2015
Replace
"Choose a box that contains all spheres you want to consider."
by
"Choose a box that contains the volume of intersection."
The smaller you can choose the box, the better the approximation to the volume of intersection for given N.
Best wishes
Torsten.

Sign in to comment.


Torsten
Torsten on 22 May 2015
I just noticed that I misunderstood your question, but the suggested method applies:
Choose a box that contains all spheres you want to consider.
Generate a vector of random points uniformly distributed within the box.
Check which of the random points are within at least one of the spheres.
If N is the total number of points generated and N_I is the number of points in at least one of the spheres, then the volume of the union of the spheres is approximately
N_I/N * (Volume of the box).
I don't know how many random points you will need to get a good approximation to the volume of the union of the spheres, but it's worth a try.
Best wishes
Torsten.
  2 Comments
Saeid Savarmand
Saeid Savarmand on 22 May 2015
Thanks Torsten,
I'm not familiar with the approach you provided. I can't follow.
Best regards,
Saeid

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!