0
$\begingroup$

Is there a way to calculate the volume of these different regions without making the algebra ?

{{RGBColor[1, 0, 0], 
  ClipPlanes -> {InfinitePlane[{{0, 0, -0.0664608}, {0, 
       1, -0.0664608}, {1, 1, -0.0664608}}]}, Opacity[0.5], 
  Sphere[{0, 0, 0}, 0.986202]}, {RGBColor[0, 0, 1], 
  ClipPlanes -> {InfinitePlane[{{0, 1, -0.0664608}, {0, 
       0, -0.0664608}, {1, 1, -0.0664608}}]}, Opacity[0.5], 
  Sphere[{0, 0, 0.831202}, 1.33191]}, {RGBColor[0, 0, 1], 
  ClipPlanes -> {InfinitePlane[{{0, 0, -0.0664608}, {0, 
       1, -0.0664608}, {1, 1, -0.0664608}}]}, Opacity[0.5], 
  Sphere[{0, 0, 0.677365}, 1.23347]}}

I'm using this in a Graphics3D.

More generally, I'd like to enter into Graphics3D what I want and to get the volume without entering into complicated trigonometry. I tried to use Volume[] but I did not manage to go from this description of the region to something that fits Volume[]

$\endgroup$

1 Answer 1

1
$\begingroup$

Graphics primitives you use in Graphics3D also work with regions - read about those in docs, there many helpful functions. For example, your case something as simple as this works:

Volume[RegionUnion[
    Ball[{0,0,0},0.986202],
    Ball[{0,0,0.831202},1.33191],
    Ball[{0,0,0.677365},1.23347]
]]

11.0001

and no need for ClipPlanes because ClipPlanes takes care not counting duplicate volume. Note, Sphere does not have a volume, it is a shell, so use Ball.

But I see you got actually one region inside 2 others. So, did you mean to cut out that one? In this case, you could do something like this (note, just for the fun of it I am sowing symbolic power of regions):

symReg=Rationalize[{
Ball[{0,0,0},0.986202],
Ball[{0,0,0.831202},1.33191],
Ball[{0,0,0.677365},1.23347]}]

Out[]=  
{Ball[{0,0,0},493101/500000], 
Ball[{0,0,415601/500000},133191/100000],
Ball[{0,0,135473/200000},123347/100000]}

Volume[RegionUnion[symReg[[;;2]]]]-Volume[RegionUnion[symReg[[3]]]]

$$\frac{207637012757096261485097 \pi }{207800500000000000000000}$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.