I want to find the volume of a torus
torus =
RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}]
dtorus =
DiscretizeGraphics[Cases[Normal @ torus, _GraphicsGroup, -1][[1]]]
The Documentation
for RegionMeasure
states:
"RegionMeasure is also known as count (0D), length (1D), area (2D), volume (3D)..."
{Area @ dtorus, RegionMeasure @ dtorus, Volume @ dtorus}
{78.6557, 78.6557, 0}
Next, I want to find the volume of the torus' bounding cuboid
bounds = RegionBounds[dtorus]
{{-3., 3.}, {-3., 3.}, {-1., 1.}}
cuboid =
Graphics3D[{Green, Opacity @ 0.2, Cuboid @@ Transpose[bounds]}];
Show[torus, cuboid, Boxed -> False, Axes -> False]
Now find the volume of the cuboid
dcuboid =
DiscretizeGraphics @ cuboid
{Area @ dcuboid, RegionMeasure @ dcuboid, Volume @ dcuboid}
{Infinity, 72., 72.}
Questions
How can it be that the Volume
of the bounding cuboid, 72
, is lower than the "Volume" of the torus, 78 .6557
?
What do I overlook here?
What other options do I have to find the volume of my torus?
{Area @ dtorus, RegionMeasure @ dtorus, Volume @ dtorus}
->{78.6557, 78.6557, 0}
. As I understand, RevolutionPlot3D plots a surface. A surface itself has 0 volume, for instance, a sphere. $\endgroup$RegionDimension[dtorus]
, you'll see why. In this caseRegionMeasure
is giving you the surface area of the torus since you have a 2D region. $\endgroup$DiscretizeGraphics
will almost always give a surface discretization regardless of how the graphics was generated, which will result in a 2D region in general. $\endgroup$