How to determine volume within intersecting spheres

12 次查看(过去 30 天)
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.

回答(2 个)

Torsten
Torsten 2015-5-22
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 个评论
Torsten
Torsten 2015-5-22
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.

请先登录,再进行评论。


Torsten
Torsten 2015-5-22
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.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by