Skip to main content
Added example with eight elements.
Source Link
Bob Hanlon
  • 167.4k
  • 7
  • 82
  • 213
spheres = { Sphere[{50, 50, 50}, 25], Sphere[{70, 70, 70}, 25]}; rgn = RegionUnion @@ (spheres /. Sphere -> Ball); RegionMeasure[rgn // N] 
Volume[rgn // N] 

EDIT: Example with more elements

rgn2 = RegionUnion[ Ball[{100., 100., 100.}, 30.], Ball[{120., 120., 120.}, 30.], Ball[{130., 130., 130.}, 30.], Ball[{140., 140., 140.}, 30.], Ball[{190., 190., 190.}, 30.], Ball[{200., 200., 200.}, 30.], Ball[{210., 210., 210.}, 30.], Ball[{230., 230., 230.}, 30.]]; RegionMeasure[rgn2] 
Volume[rgn2] 
spheres = { Sphere[{50, 50, 50}, 25], Sphere[{70, 70, 70}, 25]}; rgn = RegionUnion @@ (spheres /. Sphere -> Ball); RegionMeasure[rgn // N] 
Volume[rgn // N] 
spheres = { Sphere[{50, 50, 50}, 25], Sphere[{70, 70, 70}, 25]}; rgn = RegionUnion @@ (spheres /. Sphere -> Ball); RegionMeasure[rgn // N] 
Volume[rgn // N] 

EDIT: Example with more elements

rgn2 = RegionUnion[ Ball[{100., 100., 100.}, 30.], Ball[{120., 120., 120.}, 30.], Ball[{130., 130., 130.}, 30.], Ball[{140., 140., 140.}, 30.], Ball[{190., 190., 190.}, 30.], Ball[{200., 200., 200.}, 30.], Ball[{210., 210., 210.}, 30.], Ball[{230., 230., 230.}, 30.]]; RegionMeasure[rgn2] 
Volume[rgn2] 
Source Link
Bob Hanlon
  • 167.4k
  • 7
  • 82
  • 213

spheres = { Sphere[{50, 50, 50}, 25], Sphere[{70, 70, 70}, 25]}; rgn = RegionUnion @@ (spheres /. Sphere -> Ball); RegionMeasure[rgn // N] 
Volume[rgn // N]