Steinmetz Solid

Author

Eric W. Weisstein
July 22, 2014

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SolidGeometry/SteinmetzSolid.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/SteinmetzSolid.html.

©2014 Wolfram Research, Inc. except for portions noted otherwise

Initialization

Code

NormSquared[x_]:=x.x
CylinderInequalities[Cylinder[{x1_,x2_}],x0_]:=NormSquared[Cross[x2-x1,x1-x0]]<NormSquared[x2-x1]
CylinderInequalities[c_List,x0_]:=And@@(c/.cyl_Cylinder:>CylinderInequalities[cyl,x0])

2 Cylinders

Definitions

reg=RegionIntersection@@(Cylinder[a{-#,#},a]&/@{{1,0,0},{0,0,1}});

assum=a>0;

Graphic

Diagram

Show[SolidData["Steinmetz2Solid","Image"],ImageSize->Small,Method->{"ShrinkWrap"->True}]

V5

<<Graphics`Shapes`

ngon[r_,h_,n_,a_]:=Polygon[Table[{r Cos[a i],r Sin[a i],h},{i,0,n-1}]]
CylZ:=With[{n=20,h=2,r=1},Module[{a=2Pi/n},
Append[Cylinder[r,h],{ngon[r,h,n,a],ngon[r,-h,n,a]}]]
]
CylY:=RotateShape[CylZ,0.,Pi/2.,0.]
CylX:=RotateShape[CylZ,0.,Pi/2.,Pi/2.]

Show[Graphics3D[{CylX,CylZ}],Boxed->False]

V6

Graphics3D[cyl=Cylinder[2{-#,#}]&/@{{1,0,0},{0,0,1}}]

Graphics3D[cyl=Cylinder[{-#,#}]&/@{{1,0,0},{0,0,1}}]

LiveGraphics3D

<<Utilities`LiveGraphics3D`

WriteLiveForm["steinm2.m",
	Show[NonIntersectingPolygons[Graphics3D[{CylX,CylZ}]],Boxed->False,opts]]

POV-Ray

<<Utilities`POVRay`

POVCoefficients[x^2+y^2-1,{x,y,z}]

POVCoefficients[z^2+y^2-1,{x,y,z}]

Interior

DiscretizeRegion

reg

Block[{a=1},Show[DiscretizeRegion[reg],ImageSize->Small,Method->{"ShrinkWrap"->True}]]

V5.2

Solve[{x^2+y^2==a^2,y^2+z^2==a^2},{x,y}]

Simplify[Sqrt[1+D[Sqrt[a^2-z^2],z]^2]]

16 Integrate[z a/Sqrt[a^2-z^2],{z,0,a},Assumptions->{a>0}]

Integrate[4 (a^2-z^2),{z,-a,a},Assumptions->{a>0}]

<<Graphics`Shapes`

Show[Graphics3D[Torus[.2,3]],Boxed->False]

f[x_,y_]:=(Sqrt[1-(x^2)])/;(x^2)≥(y^2);
f[x_,y_]:=(Sqrt[1-(y^2)])/;(x^2)<(y^2);

n=80;
stein2=Show[{
Plot3D [f[x,y],{x,-1,1},{y,-1,1},PlotPoints->{n,n},Mesh->False,Boxed->False,DisplayFunction->Identity],
Plot3D [-f[x,y],{x,-1,1},{y,-1,1},PlotPoints->{n,n},Mesh->False,Boxed->False,DisplayFunction->Identity],
Table[ParametricPlot3D[{i Sqrt[1-x^2],j Sqrt[1-x^2],1.01x},{x,-1,1},DisplayFunction->Identity],{i,-1,1,2},{j,-1,1,2}]
},
AspectRatio->Automatic,Axes->False,BoxRatios->{1,1,1},
Boxed->False,ViewPoint->{2.3,1.,1.5}];

POVray["Phosphine:Graphics Files:POVRay:Mathematica:steinm2.pov",stein2];

n=30;
Show[{
Plot3D [f[x,y],{x,-1,1},{y,-1,1},PlotPoints->{n,n},Boxed->False,DisplayFunction->Identity],
Plot3D [-f[x,y],{x,-1,1},{y,-1,1},PlotPoints->{n,n},Boxed->False,DisplayFunction->Identity],
Table[ParametricPlot3D[{i Sqrt[1-x^2],j Sqrt[1-x^2],1.01x},{x,-1,1},DisplayFunction->Identity],{i,-1,1,2},{j,-1,1,2}]
},DisplayFunction->$DisplayFunction,
AspectRatio->Automatic,Axes->False,BoxRatios->{1,1,1},
Boxed->False,ViewPoint->{2.3,1.,1.5}]

CylindricalDecomposition[{x^2+z^2<1,x^2+y^2<1},{x,y,z}]

<<Graphics`InequalityGraphics`

InequalityPlot3D[{x^2+z^2<1,x^2+y^2<1},{x,-2,2},{y,-2,2},{z,-2,2}]

V6

ParametricPlot3D[{Sqrt[1-z^2],-u Sqrt[1-z^2],z},{z,-1,1},{u,-1,1}]

ParametricPlot3D[{
{Sqrt[1-z^2],-u Sqrt[1-z^2],z},{-Sqrt[1-z^2],u Sqrt[1-z^2],z},
{u Sqrt[1-z^2],Sqrt[1-z^2],z},
{-u Sqrt[1-z^2],-Sqrt[1-z^2],z}
},{z,-1,1},{u,-1,1}]

ineq=CylinderInequalities[cyl,{x,y,z}]//FullSimplify

RegionPlot3D[(y^2)+(z^2)<1&&(x^2)+(y^2)<1,{x,-1,1},{y,-1,1},{z,-1,1},Boxed->False,Axes->None,PlotPoints->50,Mesh->None]

LiveGraphics3D

WriteLiveForm["steinm2.m",
ParametricPlot3D[{
{Sqrt[1-z^2],-u Sqrt[1-z^2],z},{-Sqrt[1-z^2],u Sqrt[1-z^2],z},
{u Sqrt[1-z^2],Sqrt[1-z^2],z},
{-u Sqrt[1-z^2],-Sqrt[1-z^2],z}
},{z,-1,1},{u,-1,1},PlotPoints->{20,10},Boxed->False,Axes->False,Evaluate[Sequence@@opts]]
]

Hidezaku

<<ExtraPackages`Hidekazu`Knife`
<<Graphics`Shapes`

cy=Graphics3D[Cylinder[1,1,40]];
cy1=RotateShape[cy,0,(π/2),0];
cy2=RotateShape[cy,0,(π/2),(π/2)];

f[x_,y_]:=(Sqrt[1-(x^2)])/;(x^2)≥(y^2);
f[x_,y_]:=(Sqrt[1-(y^2)])/;(x^2)<(y^2);

c=Graphics3D[Plot3D[f[x,y],{x,-1,1},{y,-1,1},PlotPoints->{30,30},DisplayFunction->Identity]][[1]];

c1=RotateShape[c,0,π,0];

gr1=Show[{cy1,cy2},Boxed->False]

gr2=WriteLiveForm["steinms2.m",
Show[Graphics3D[{c,c1}]]]

gr=knife[gr2,{0,0,1,-.7},{0,0,0},{0,0,1}];
Show[gr]

Centroid

Integrate

Integrate[{x,y, z}Boole[x^2+z^2<a^2&&x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]//Timing

RegionCentroid[reg/.a->1]

Volume

v5.0

<<Calculus`Integration`

Integrate[Boole[x^2+z^2<1&&x^2+y^2<1],{x},{y},{z}]

v1=16 (∫_0^1)((∫_0^x)(Sqrt[1-(x^2)])\[DifferentialD]y)\[DifferentialD]x

v2=(∫_(-1)^1)2 (Sqrt[1-(z^2)]) 2 (Sqrt[1-(z^2)])\[DifferentialD]z

v5.1

Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]//Timing

v6

Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]//Timing

V8

(v=Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0])//Timing

RegionMeasure

Assuming[assum,RegionMeasure[reg]]

RegionMeasure[reg/.a->1]

InertiaTensor

Integrate[InertiaTensor[{x,y, z}]Boole[x^2+z^2<a^2&&x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]/v//Timing

Volume of Elliptical Cylinders

v6

Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<b^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<b<a]//Timing

Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<b^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]//Timing

FullSimplify[Last[%1],0<b<a]

FunctionExpand[%,0<b<a]

FullSimplify[EllipticSimplify[Last[%%]],0<b<a]

Check

With[{a=1,b=.5},NIntegrate[Boole[x^2+z^2<a^2&&x^2+y^2<b^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]

With[{a=1,b=.5},(8/3) a (((a^2)+(b^2)) EllipticE[((b^2)/(a^2))]+(-(a^2)+(b^2)) EllipticK[((b^2)/(a^2))])]

Surface

eqn=(x^2+y^2-a^2)(y^2+z^2-b^2);

Expand[eqn]

Block[{a=1,b=.8},ContourPlot3D[eqn==0,{x,-2,2},{y,-2,2},{z,-2,2},MaxRecursion->5]]

AlgebraicDegree[eqn,{x,y,z}]

SortBy[FullSimplify[GaussianCurvature[eqn,{x,y,z}],a>0&&b>0],ByteCount]

ByteCount/@%

3 Cylinders

Definitions

reg=RegionIntersection@@(Cylinder[a{-#,#},a]&/@IdentityMatrix[3]);

assum=a>0;

Graphics

V5

ngon[r_,h_,n_,a_]:=Polygon[Table[{r Cos[a i],r Sin[a i],h},{i,0,n-1}]]
CylZ:=With[{n=20,h=2,r=1},Module[{a=2Pi/n},
Append[Cylinder[r,h],{ngon[r,h,n,a],ngon[r,-h,n,a]}]]
]
CylY:=RotateShape[CylZ,0.,Pi/2.,0.]
CylX:=RotateShape[CylZ,0.,Pi/2.,Pi/2.]

Show[Graphics3D[{CylX,CylY,CylZ}],Boxed->False]

V6

Graphics3D[cyl=Cylinder[2{-#,#}]&/@IdentityMatrix[3]]

Graphics3D[cyl=Cylinder[{-#,#}]&/@IdentityMatrix[3]]

LiveGraphics3D`

<<Utilities`LiveGraphics3D`

WriteLiveForm["steinm3.m",
	Show[NonIntersectingPolygons[Graphics3D[{CylX,CylY,CylZ}]],Boxed->False]]

<<Graphics`Shapes`

cy=Graphics3D[Cylinder[1,1,40]];
cy1=RotateShape[cy,0,(π/2),0];
cy2=RotateShape[cy,0,(π/2),(π/2)];

gr3=Show[{cy,cy1,cy2},BoxRatios->Automatic,Boxed->False,Axes->False]

Interior

Diagram

Show[SolidData["Steinmetz3Solid","Image"],ImageSize->Small,Method->{"ShrinkWrap"->True}]

DiscretizeRegion

Block[{a=1},Show[DiscretizeRegion[reg],ImageSize->Small,Method->{"ShrinkWrap"->True}]]

RegionPlot3D

ineq=FullSimplify[CylinderInequalities[cyl,{x,y,z}]]

ineq=(y^2)+(z^2)<1&&(x^2)+(z^2)<1&&(x^2)+(y^2)<1;

RegionPlot3D[ineq,{x,-1,1},{y,-1,1},{z,-1,1},Boxed->False,Axes->None,PlotPoints->60,Mesh->None,Method->{"ShrinkWrap"->True},ImageSize->200]

Jason

RegionPlot3D[x^2+y^2<1^2||x^2+z^2<1^2||y^2+z^2<1^2,{x,-5,5},{y,-5,5},{z,-5,5},Mesh->None,PlotStyle->{{Yellow,Opacity[0.5]}},PlotPoints->70]

ContourPlot3D[(x^2+y^2-1) (x^2+z^2-1) (y^2+z^2-1)==0,{x,-5,5},{y,-5,5},{z,-5,5},Mesh->None,PlotPoints->40,ContourStyle->Directive[Orange,Specularity[White,30]]]

RegionPlot3D[x^2+y^2<1^2&&x^2+z^2<1^2&&y^2+z^2<1^2,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->None,PlotStyle->{{Yellow,Opacity[0.5]}},PlotPoints->70]

g1=ContourPlot3D[(x^2+y^2-1)==0,{x,-1.5,1.5},{y,-1.5,1.5},{z,-1.5,1.5},Mesh->None,PlotPoints->40,ContourStyle->Directive[Blue,Specularity[White,30]],Boxed->False,Axes->False,RegionFunction->Function[{x,y,z},x^2+z^2<1^2&&y^2+z^2<1^2]];
g2=ContourPlot3D[(x^2+z^2-1)==0,{x,-1.5,1.5},{y,-1.5,1.5},{z,-1.5,1.5},Mesh->None,PlotPoints->40,ContourStyle->Directive[Green,Specularity[White,30]],Boxed->False,Axes->False,RegionFunction->Function[{x,y,z},x^2+y^2<1^2&&y^2+z^2<1^2]];
g3=ContourPlot3D[(y^2+z^2-1)==0,{x,-1.5,1.5},{y,-1.5,1.5},{z,-1.5,1.5},Mesh->None,PlotPoints->40,ContourStyle->Directive[Orange,Specularity[White,30]],Boxed->False,Axes->False,RegionFunction->Function[{x,y,z},x^2+y^2<1^2&&x^2+z^2<1^2]];

Show[{g1,g2,g3}]

RegionPlot3D[x^2+y^2<1^2&&x^2+z^2<1^2&&y^2+z^2<1^2,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->None,Boxed->False,Axes->False,PlotPoints->70,ColorFunction->(RGBColor[(#1^2+#2^2)^1000,(#1^2+#3^2)^1000,(#2^2+#3^2)^1000]&),ColorFunctionScaling->False]

Hidezaku

v5.2

f[x_,y_]:=(Sqrt[1-(x^2)])/;(x^2)≥(y^2)
f[x_,y_]:=(Sqrt[1-(y^2)])/;(x^2)<(y^2)
stein[n_:15]:=Plot3D[f[x,y],{x,-(1/(Sqrt[2])),(1/(Sqrt[2]))},{y,-(1/(Sqrt[2])),(1/(Sqrt[2]))},PlotPoints->{n,n},DisplayFunction->Identity]
stein3[n_]:=Module[{s=stein[n]},
RotateShape[If[Head[s]===SurfaceGraphics,Graphics3D[s],s],0,#[[1]],#[[2]]]&/@{{0,0},{Pi/2,0},{Pi,0},{-Pi/2,0},{Pi/2,Pi/2},{-Pi/2,Pi/2}}
]

Show[stein3[15],Boxed->False,BoxRatios->{1,1,1},DisplayFunction->$DisplayFunction,Axes->False]

v6

stein[opts___]:=Plot3D[If[(x^2)≥(y^2),(Sqrt[1-(x^2)]),(Sqrt[1-(y^2)])],{x,-(1/(Sqrt[2])),(1/(Sqrt[2]))},{y,-(1/(Sqrt[2])),(1/(Sqrt[2]))},opts,BoxRatios->1,BoundaryStyle->None]
stein3[opts___]:=RotateShape[stein[opts],0,#[[1]],#[[2]]]&/@{{0,0},{Pi/2,0},{Pi,0},{-Pi/2,0},{Pi/2,Pi/2},{-Pi/2,Pi/2}}

RotateShape[g_,x_,y_,z_]:=Module[{mat=RotationMatrix[Pi-z,{0,0,1}].RotationMatrix[y,{1,0,0}].RotationMatrix[Pi-x,{0,0,1}]},
g/.Graphics3D[gr_,opt___]:>Graphics3D[GeometricTransformation[gr,mat],opt]
]

Show[stein3[PlotPoints->40,Mesh->False],Boxed->False,Axes->False,PlotRange->All]

ContourPlot3D[{(x^2+y^2-1)==0,(x^2+z^2-1)==0,(y^2+z^2-1)==0},{x,-1.5,1.5},{y,-1.5,1.5},{z,-1.5,1.5},Mesh->None,PlotPoints->40,ContourStyle->Directive[Blue,Specularity[White,30]],Boxed->False,Axes->False,BoundaryStyle->{White,White,White,{1,2}->Red,{1,3}->Green,{2,3}->Yellow}]

ContourPlot3D[{(x^2+y^2-1)==0,(x^2+z^2-1)==0,(y^2+z^2-1)==0},{x,-1.5,1.5},{y,-1.5,1.5},{z,-1.5,1.5},Mesh->None,PlotPoints->40,ContourStyle->Directive[Yellow,Specularity[White,30]],Boxed->False,Axes->False,BoundaryStyle->{{1,2}->{Red,Tube[0.03]},1->{Green,Tube[0.02]},2->{Green,Tube[0.02]},{2,3}->{Orange,Tube[0.03]},{1,3}->{Brown,Tube[0.03]},3->{Green,Tube[0.02]}}]

ContourPlot3D[Max[x^2+y^2-1,x^2+z^2-1,y^2+z^2-1]==0,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->None,PlotPoints->40,ContourStyle->Directive[Orange,Specularity[White,30]],MaxRecursion->1]

WriteLiveForm["steinms3.m",%]

Show[Graphics3D[{WireFrame[Graphics3D[stein3[30]]][[1]],Polyhedron[Cube]/.Polygon[x_]:>Polygon[Sqrt[2]x]}],Boxed->False]

InequalityPlot3D[{x^2+z^2<1,x^2+y^2<1,y^2+z^2<1},{x,-2,2},{y,-2,2},{z,-2,2}]

sq=Sqrt[2]/2;
gr5=knife[Graphics[Flatten[{stein3[15]}]],
{0,0,1,-sq},{0,0,0},{0,0,1}];
gr6=knife[gr5,{1,0,0,-sq},{0,0,0},{1,0,0}];
gr7=knife[gr6,{0,1,0,sq},{0,0,0},{0,1,0}];

gr8=knife[gr7,{0,0,1,sq},{0,0,0},{0,0,1}];
gr9=knife[gr8,{1,0,0,sq},{0,0,0},{1,0,0}];
gr10=knife[gr9,{0,1,0,-Sqrt[3]},{0,0,0},{0,1,0}];

WriteLiveForm["steinm3c.m",show[{
gr10,
TranslateShape[Graphics3D[Cube[]],{1,1,1}]
}]]

Convex

ineq=(y^2)+(z^2)<1&&(x^2)+(z^2)<1&&(x^2)+(y^2)<1;

Centroid

Integrate[{x,y, z}Boole[x^2+z^2<a^2&&x^2+y^2<a^2&&y^2+z^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]//Timing

InertiaTensor

Integrate[InertiaTensor[{x,y, z}]Boole[x^2+z^2<a^2&&x^2+y^2<a^2&&y^2+z^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]/v//Timing

FullSimplify[Last[%]]

Volume

v5

w1=Simplify[16 (∫_0^(π/4))(∫_0^1)s (Sqrt[1-(s^2) ((Cos[t])^2)])\[DifferentialD]s\[DifferentialD]t]

w2=Simplify[6 (∫_(1/(Sqrt[2]))^1)2 (Sqrt[1-(z^2)]) 2 (Sqrt[1-(z^2)])\[DifferentialD]z+((((2/(Sqrt[2]))))^3)]

<<Calculus`Integration`

Integrate[Boole[x^2+z^2<1&&x^2+y^2<1&&y^2+z^2<1],{x},{y},{z}]

v6

Integrate[Boole[x^2+z^2<1&&x^2+y^2<1&&y^2+z^2<1],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]//Timing

Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<a^2&&y^2+z^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0]//Simplify//Timing

V8

(v=Integrate[Boole[x^2+z^2<a^2&&x^2+y^2<a^2&&y^2+z^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0])//Simplify//Timing

Simplify[Last[%]]

RegionMeasure

RegionMeasure[reg/.a->1]

Surface

eqn=(x^2+y^2-a^2)(y^2+z^2-b^2);

Expand[eqn]

Block[{a=1,b=.8},ContourPlot3D[eqn==0,{x,-2,2},{y,-2,2},{z,-2,2},MaxRecursion->5]]

AlgebraicDegree[eqn,{x,y,z}]

SortBy[FullSimplify[GaussianCurvature[eqn,{x,y,z}],a>0&&b>0],ByteCount]

ByteCount/@%

4 Cylinders

Definitions

reg=RegionIntersection@@(Cylinder[{-#,#}a,a]&/@{{0,0,1},{0,((2 (Sqrt[2]))/3),(1/3)},{(Sqrt[(2/3)]),-((Sqrt[2])/3),(1/3)},{-(Sqrt[(2/3)]),-((Sqrt[2])/3),(1/3)}});

assum=a>0;

Inequality

ineq=(x^2)+(y^2)≤1&&9 (x^2)+(y^2)+8 (z^2)≤9+4 (Sqrt[2]) y z&&3 (x^2)+4 (Sqrt[3]) x y+7 (y^2)+2 (Sqrt[2]) y z+8 (z^2)≤9+2 (Sqrt[6]) x z&&3 (x^2)+7 (y^2)+2 (Sqrt[6]) x z+2 (Sqrt[2]) y z+8 (z^2)≤9+4 (Sqrt[3]) x y;

Definition

ngon[r_,h_,n_,a_]:=Polygon[Table[{r Cos[a i],r Sin[a i],h},{i,0,n-1}]]
CylZ:=With[{n=20,h=2,r=1},Module[{a=2Pi/n},
Append[Cylinder[r,h],{ngon[r,h,n,a],ngon[r,-h,n,a]}]]
]

rots=With[{t=Pi/2-ArcTan[1/4Sqrt[2]],h=1},
{{0,0},{t,0},{t,2Pi/3},{t,4Pi/3}}
];
cyls=RotateShape[CylZ,0,Sequence@@#]&/@rots;

Figure

DiscretizeRegion

DiscretizeRegion[RegionUnion@@(Cylinder[2{-#,#}]&/@{{0,0,1},{0,((2 (Sqrt[2]))/3),(1/3)},{(Sqrt[(2/3)]),-((Sqrt[2])/3),(1/3)},{-(Sqrt[(2/3)]),-((Sqrt[2])/3),(1/3)}}),MaxCellMeasure->.001,Method->"Boolean"]

V5.2

Show[Graphics3D[cyls],Boxed->False]

V6

rots={{0,0},{(π/2)-ArcTan[(1/(2 (Sqrt[2])))],0},{(π/2)-ArcTan[(1/(2 (Sqrt[2])))],((2 π)/3)},{(π/2)-ArcTan[(1/(2 (Sqrt[2])))],((4 π)/3)}};

cyls=RotationMatrixZ[#[[2]]].RotationMatrixX[#[[1]]].{0,0,1}&/@rots

Graphics3D[cyl=Cylinder[2{-#,#}]&/@cyls]

Interior

Diagram

Show[SolidData["Steinmetz4Solid","Image"],ImageSize->Small,Method->{"ShrinkWrap"->True}]

DiscretizeRegion

Block[{a=1},Show[DiscretizeRegion[reg],ImageSize->Small,Method->{"ShrinkWrap"->True}]]

Hi-res

pts={x,y,z}/.Solve[(ineq=CylinderInequalities[cyl,{x,y,z}])/.Less->Equal,{x,y,z}]

pts3=Complement[Union[{x,y,z}/.(ToRules[Reduce[#,{x,y,z},Reals]]&/@(Subsets[ineq,{3}]/.Less->Equal))],pts]

g=;

{Graphics3D[{
{Opacity[.7],cyl},
Red,Sphere[pts,.1],
Blue,Sphere[pts3,.1]
},Axes->True,AxesOrigin->{0,0,0},Ticks->None],Show[g,ImageSize->Automatic]}

LiveGraphics3D

WriteLiveForm["steinm4.m",
	Show[NonIntersectingPolygons[Graphics3D[{CylZ,cyls}]],Boxed->False]]

Bounding Box

Through[{MinValue,MaxValue}[{#,ineq},{x,y,z}]]&/@{x,y,z}

Region

ineq=FullSimplify[CylinderInequalities[cyl,{x,y,z}]]

ineq=(x^2)+(y^2)<1&&9 (x^2)+(y^2)+8 (z^2)<9+4 (Sqrt[2]) y z&&3 (x^2)+4 (Sqrt[3]) x y+7 (y^2)+2 (Sqrt[2]) y z+8 (z^2)<9+2 (Sqrt[6]) x z&&3 (x^2)+7 (y^2)+2 (Sqrt[6]) x z+2 (Sqrt[2]) y z+8 (z^2)<9+4 (Sqrt[3]) x y/.Less->LessEqual

MinValue[{#,ineq},{x,y,z}]&/@{x,y,z}

MaxValue[{#,ineq},{x,y,z}]&/@{x,y,z}

With[{h=1.2},
RegionPlot3D[ineq,{x,-h,h},{y,-h,h},{z,-h,h},Boxed->False,Axes->None,PlotPoints->75,Mesh->None]]

Centroid

Discussion

-------- Original Message --------
Subject: Re: Integrate of Steinmetz cylinder inequalities
Date: Fri, 13 Aug 2010 11:36:33 +0200
From: Adam Strzebonski
To: Eric Weisstein

Eric Weisstein wrote:
> Hi, Adam.
> 
> Any suggestion on how to get the following integrals to compute?  This 
> is the volume common to 4 intersecting cylinders. (Perhaps some kind of 
> hand-factoring involving the Sqrt[2] and Sqrt[3]?)
> 
> ineq = x^2 + y^2 < 1 && 9 x^2 + y^2 + 8 z^2 < 9 + 4 Sqrt[2] y z &&
>  3 x^2 + 4 Sqrt[3] x y + 7 y^2 + 2 Sqrt[2] y z + 8 z^2 <
>   9 + 2 Sqrt[6] x z &&
>  3 x^2 + 7 y^2 + 2 Sqrt[6] x z + 2 Sqrt[2] y z + 8 z^2 <
>   9 + 4 Sqrt[3] x y;
> 
> Integrate[{x, y, z} Boole[ineq], {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
>   GenerateConditions -> True] // Timing
> 
> (* should be {0,0,0} *)
> 
> Integrate[Boole[ineq], {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
>   GenerateConditions -> True] // Timing
> 
> Tried without GenerateConditions -> True but get wrong results (probably 
> wrong branch).  I’m trying various variable reorderings, but no luck yet.
> 
> Thanks,
> -E

The piecewise subdivision part of the code works fine here, but some
of the resulting 58 integrals do not give closed form results.
For instance

In[30]:= Integrate[x, {x, -1/2, -1/2*Sqrt[3/7]},
  {y, Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 9*#1^2 -
      6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2],
   Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 9*#1^2 -
      6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4]},
  {z, -1/4*Sqrt[18 - 18*x^2] + y/(2*Sqrt[2]), (Sqrt[6]*x - Sqrt[2]*y)/8 +
    Sqrt[72 - 18*x^2 - 36*Sqrt[3]*x*y - 54*y^2]/8}] 
                                  //InputForm

Out[30]//InputForm=
Integrate[(9*x)/(8*Sqrt[2]) - (3*x^3)/(4*Sqrt[2]) +
  (5*Sqrt[3/2]*x^2*Sqrt[1 - x^2])/4 +
  (x*
    (-((4*Sqrt[3]*ArcSin[1/(2*Sqrt[3]*Sqrt[(Sqrt[3]*x + 3*Root[
                 -3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
                   9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2])^(-2)])]*
         Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x +
                  10*Sqrt[3]*x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 
9*#1^4 & ,
              2])^(-2)] + Sqrt[4 - x^2 - 2*Sqrt[3]*x*
           Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
              9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2] -
          3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 9*
                #1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2]^2])/
       Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x +
                10*Sqrt[3]*x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & ,
            2])^(-2)]) +
     (4*Sqrt[3]*ArcSin[1/(2*Sqrt[3]*Sqrt[(Sqrt[3]*x + 3*Root[
                -3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
                  9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4])^(-2)])]*
        Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x +
                 10*Sqrt[3]*x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 
9*#1^4 & ,
             4])^(-2)] + Sqrt[4 - x^2 - 2*Sqrt[3]*x*
          Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 
9*#1^2 -
             6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4] -
         3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
              9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4]^2])/
      Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*
                x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 
4])^(-2)]))/
   (8*Sqrt[2]), {x, -1/2, -1/2*Sqrt[3/7]}]


Adam

Numeric

NIntegrate[{x,y,z}Boole[ineq],{x,-1,1},{y,-1,1},{z,-(3/(2 (Sqrt[2]))),(3/(2 (Sqrt[2])))}]//Chop//Timing

(x,y,z)

(i=Integrate[{x,y,z}Boole[ineq],{x,-1,1},{y,-1,1},{z,-(3/(2 (Sqrt[2]))),(3/(2 (Sqrt[2])))}])//Timing

(x,z,y)

(i=Integrate[{x,y,z}Boole[ineq],{x,-1,1},{z,-(3/(2 (Sqrt[2]))),(3/(2 (Sqrt[2])))},{y,-1,1}])//Timing

(y,x,z)

(i=Integrate[{x,y,z}Boole[ineq],{y,-1,1},{x,-1,1},{z,-(3/(2 (Sqrt[2]))),(3/(2 (Sqrt[2])))}])//Timing

(y,z,x)

(i=Integrate[{x,y,z}Boole[ineq],{y,-1,1},{z,-(3/(2 (Sqrt[2]))),(3/(2 (Sqrt[2])))},{x,-1,1}])//Timing

(z,y,x)

(i=Integrate[{x,y,z}Boole[ineq],{z,-(3/(2 (Sqrt[2]))),(3/(2 (Sqrt[2])))},{y,-1,1},{x,-1,1}])//Timing

Volume

-------- Original Message --------
Subject: Re: Integrate of Steinmetz cylinder inequalities
Date: Fri, 13 Aug 2010 11:36:33 +0200
From: Adam Strzebonski
To: Eric Weisstein

Eric Weisstein wrote:
> Hi, Adam.
> 
> Any suggestion on how to get the following integrals to compute?  This 
> is the volume common to 4 intersecting cylinders. (Perhaps some kind of 
> hand-factoring involving the Sqrt[2] and Sqrt[3]?)
> 
> ineq = x^2 + y^2 < 1 && 9 x^2 + y^2 + 8 z^2 < 9 + 4 Sqrt[2] y z &&
>  3 x^2 + 4 Sqrt[3] x y + 7 y^2 + 2 Sqrt[2] y z + 8 z^2 <
>   9 + 2 Sqrt[6] x z &&
>  3 x^2 + 7 y^2 + 2 Sqrt[6] x z + 2 Sqrt[2] y z + 8 z^2 <
>   9 + 4 Sqrt[3] x y;
> 
> Integrate[{x, y, z} Boole[ineq], {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
>   GenerateConditions -> True] // Timing
> 
> (* should be {0,0,0} *)
> 
> Integrate[Boole[ineq], {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
>   GenerateConditions -> True] // Timing
> 
> Tried without GenerateConditions -> True but get wrong results (probably 
> wrong branch).  I’m trying various variable reorderings, but no luck yet.
> 
> Thanks,
> -E

The piecewise subdivision part of the code works fine here, but some
of the resulting 58 integrals do not give closed form results.
For instance

In[30]:= Integrate[x, {x, -1/2, -1/2*Sqrt[3/7]},
  {y, Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 9*#1^2 -
      6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2],
   Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 9*#1^2 -
      6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4]},
  {z, -1/4*Sqrt[18 - 18*x^2] + y/(2*Sqrt[2]), (Sqrt[6]*x - Sqrt[2]*y)/8 +
    Sqrt[72 - 18*x^2 - 36*Sqrt[3]*x*y - 54*y^2]/8}] 
                                  //InputForm

Out[30]//InputForm=
Integrate[(9*x)/(8*Sqrt[2]) - (3*x^3)/(4*Sqrt[2]) +
  (5*Sqrt[3/2]*x^2*Sqrt[1 - x^2])/4 +
  (x*
    (-((4*Sqrt[3]*ArcSin[1/(2*Sqrt[3]*Sqrt[(Sqrt[3]*x + 3*Root[
                 -3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
                   9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2])^(-2)])]*
         Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x +
                  10*Sqrt[3]*x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 
9*#1^4 & ,
              2])^(-2)] + Sqrt[4 - x^2 - 2*Sqrt[3]*x*
           Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
              9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2] -
          3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 9*
                #1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 2]^2])/
       Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x +
                10*Sqrt[3]*x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & ,
            2])^(-2)]) +
     (4*Sqrt[3]*ArcSin[1/(2*Sqrt[3]*Sqrt[(Sqrt[3]*x + 3*Root[
                -3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
                  9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4])^(-2)])]*
        Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x +
                 10*Sqrt[3]*x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 
9*#1^4 & ,
             4])^(-2)] + Sqrt[4 - x^2 - 2*Sqrt[3]*x*
          Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 - 
9*#1^2 -
             6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4] -
         3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*x^3)*#1 -
              9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 4]^2])/
      Sqrt[(Sqrt[3]*x + 3*Root[-3*x^2 + 7*x^4 + (-6*Sqrt[3]*x + 10*Sqrt[3]*
                x^3)*#1 - 9*#1^2 - 6*Sqrt[3]*x*#1^3 + 9*#1^4 & , 
4])^(-2)]))/
   (8*Sqrt[2]), {x, -1/2, -1/2*Sqrt[3/7]}]


Adam

ineq=(x^2)+(y^2)<1&&9 (x^2)+(y^2)+8 (z^2)<9+4 (Sqrt[2]) y z&&3 (x^2)+4 (Sqrt[3]) x y+7 (y^2)+2 (Sqrt[2]) y z+8 (z^2)<9+2 (Sqrt[6]) x z&&3 (x^2)+7 (y^2)+2 (Sqrt[6]) x z+2 (Sqrt[2]) y z+8 (z^2)<9+4 (Sqrt[3]) x y;

Exact

12(2Sqrt[2]-Sqrt[6])//N

RegionMeasure

RegionMeasure[reg/.a->1]//Timing

Numerical

NIntegrate[Boole[ineq],{x,-2,2},{y,-2,2},{z,-2,2}]//Timing

V4.2

<<Calculus`Integration`

Integrate[Boole[And@@{ineq1,ineq2,ineq3,ineq4}],{x},{y},{z}]//Timing

V5.0

<<Calculus`Integration`

NIntegrate[Boole[And@@ineqs],{x},{y},{z}]//Timing

Integrate[Boole[And@@ineqs],{x},{y},{z}]//Timing

V6

Integrate[Boole[And@@ineqs],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]//Timing

...crash...

V7

(i=Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}])//Timing

...wrong...

ByteCount[i]/10^6.

N[i]//Timing

ToRadicals[Root[-3 (x^2)+7 (x^4)+(6 (Sqrt[3]) x-10 (Sqrt[3]) (x^3)) #1-9 ((#1)^2)+6 (Sqrt[3]) x ((#1)^3)+9 ((#1)^4)&,2],Assumptions->(Sqrt[3/7])/2<x<1/2]

i2 = i/.r_Root:>ToRadicals[r,Assumptions->(Sqrt[3/7])/2<x<1/2]

(i=Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},GenerateConditions->True])//Timing

ineq

FindMinimum[{#,Evaluate[ineq]},{x,y,z}]&/@{x,y,z}

FindMaximum[{#,Evaluate[ineq]},{x,y,z}]&/@{x,y,z}

(i1=Integrate[Boole[ineq],{x,-∞,∞},Assumptions->-1<y<1&&-11/10<z<11/10])//Timing

NIntegrate[Last[i1],{y,-1,1},{z,-11/10,11/10}]

i2=Simplify[Last[i1]/.r_Root:>ToRadicals[r,Assumptions->-1<y<1&&-11/10<z<11/10],-1<y<1&&-11/10<z<11/10];

V8

$Version

NIntegrate[Boole[ineq],{x,-2,2},{y,-2,2},{z,-2,2}]

(x,y,z)

Integrate[Boole[ineq],{x,-2,2},{y,-2,2},{z,-2,2},GenerateConditions->True]//Timing

Integrate[Boole[ineq],{x,-2,2},{y,-2,2},{z,-2,2}]//Timing

FullSimplify[Last[%2]]//Timing

...hangs...

(x,z,y)

Integrate[Boole[ineq],{z,-2,2},{y,-2,2},{x,-2,2},GenerateConditions->True]//Timing

Integrate[Boole[ineq],{x,-2,2},{z,-2,2},{y,-2,2}]//Timing

(y,x,z)

$Version

Integrate[Boole[ineq],{y,-2,2},{x,-2,2},{z,-2,2}]//Timing

N[%]

...wrong...

Integrate[Boole[ineq],{y,-2,2},{x,-2,2},{z,-2,2},GenerateConditions->True]//Timing

(y,z,x)

$Version

Integrate[Boole[ineq],{y,-2,2},{z,-2,2},{x,-2,2},GenerateConditions->True]//Timing

Integrate[Boole[ineq],{y,-2,2},{z,-2,2},{x,-2,2}]//Timing

N[Last[%]]

(z,x,y)

$Version

Integrate[Boole[ineq],{z,-2,2},{x,-2,2},{y,-2,2},GenerateConditions->True]//Timing

Integrate[Boole[ineq],{z,-2,2},{x,-2,2},{y,-2,2},GenerateConditions->False]//Timing

Integrate[Boole[ineq],{z,-2,2},{x,-2,2},{y,-2,2}]//Timing

N[%]

(z,y,x)

(i=Integrate[Boole[ineq],{z,-∞,∞},{y,-∞,∞},{x,-∞,∞}])//Timing

N[i]//Timing

...wrong...

(i=Integrate[Boole[ineq],{z,-∞,∞},{y,-∞,∞},{x,-∞,∞},GenerateConditions->True])//Timing

6 Cylinders

Definitions

reg=RegionIntersection@@(Cylinder[{-#,#}a,a]&/@({{0,1,1},{0,-1,1},{1,0,1},{-1,0,1},{1,1,0},{-1,1,0}}/Sqrt[2]));

assum=a>0;

Inequality

ineq=2 (x^2)+(((y-z))^2)<2&&2 (x^2)+(((y+z))^2)<2&&2 (-1+(y^2))+(((x-z))^2)<0&&2 (y^2)+(((x+z))^2)<2&&(((x-y))^2)+2 (-1+(z^2))<0&&(((x+y))^2)+2 (z^2)<2;

Solid

V5.2

n=20;
h=2.5;
r=1.;
a=2. Pi/n;
ngon[r_,h_,n_]:=Polygon[Table[{r Cos[a i],r Sin[a i],h},{i,0,n-1}]]
CylZ:=Append[Cylinder[r,h],{ngon[r,h,n],ngon[r,-h,n]}];

rots={{45,0},{-45,0},{45,90},{-45,90},{90,45},{90,-45}}Degree;
cyls=RotateShape[CylZ,0,Sequence@@#]&/@rots;

Show[Graphics3D[cyls],Boxed->False]

cubes=RotateShape[Polyhedron[Cube],0,Sequence@@#]&/@rots;

Show[Graphics3D[cubes],Boxed->False]

DiscretizeRegion[RegionUnion@@(Cylinder[2{-#,#}]&/@({{0,1,1},{0,-1,1},{1,0,1},{-1,0,1},{1,1,0},{-1,1,0}}/Sqrt[2]))]

DiscretizeRegion[RegionUnion@@(Cylinder[3{-#,#}]&/@({{0,1,1},{0,-1,1},{1,0,1},{-1,0,1},{1,1,0},{-1,1,0}}/Sqrt[2]))]

V6

rots={{45 °,0},{-45 °,0},{45 °,90 °},{-45 °,90 °},{90 °,45 °},{90 °,-45 °}};

cyls=RotationMatrixZ[#[[2]]].RotationMatrixX[#[[1]]].{0,0,1}&/@rots

Graphics3D[cyl=Cylinder[3{-#,#}]&/@cyls]

Cylinder[3{-#,#}]&/@cyls

Interior

Diagram

Show[SolidData["Steinmetz6Solid","Image"],ImageSize->Small,Method->{"ShrinkWrap"->True}]

DiscretizeRegion

Block[{a=1},Show[DiscretizeRegion[reg],ImageSize->Small,Method->{"ShrinkWrap"->True}]]

RegionPlot3D

CylinderInequalities2[Cylinder[{x1_,x2_}],x0_]:=NormSquared[Cross[x2-x1,x1-x0]]<a^2NormSquared[x2-x1]

ineq=FullSimplify[CylinderInequalities[cyl,{x,y,z}]]

With[{h=1.2},
RegionPlot3D[ineq,{x,-h,h},{y,-h,h},{z,-h,h},Boxed->False,Axes->None,PlotPoints->75,Mesh->None]]

Bounding Box

Through[{MinValue,MaxValue}[{#,ineq},{x,y,z}]]&/@{x,y,z}

Volume

Exact

16/3(3+2Sqrt[3]-4Sqrt[2])//N

RegionMeasure

RegionMeasure[reg/.a->1]//Timing

Numerical

NIntegrate[Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1}]//Chop

V6.1 (x,y,z)

Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]//Timing

V6.1 (x,z,y)

Integrate[Boole[ineq],{x,-∞,∞},{z,-∞,∞},{y,-∞,∞}]//Timing

V6.1 (y,x,z)

Integrate[Boole[ineq],{y,-∞,∞},{x,-∞,∞},{z,-∞,∞}]//Timing

V6.1 (y,z,x)

Integrate[Boole[ineq],{y,-∞,∞},{z,-∞,∞},{x,-∞,∞}]//Timing

V6.1 (z,x,y)

Integrate[Boole[ineq],{z,-∞,∞},{x,-∞,∞},{y,-∞,∞}]//Timing

V6.1 (z,y,x)

Integrate[Boole[ineq],{z,-∞,∞},{y,-∞,∞},{x,-∞,∞}]//Timing

V8

Maximize[{y,ineq/.Less->LessEqual},{x,y,z}]

(i=IntegrateWithAssumptions[Boole[ineq],{z,-1,1},{y,-1,1},{y,-1,1},Simplification->Simplify])//Timing

V10 (x,y,z)

(i=Integrate[Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1}])//Timing

(i=Integrate[Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1},GenerateConditions->True])//Timing

V10 (x,z,y)

(i=Integrate[Boole[ineq],{x,-1,1},{z,-1,1},{y,-1,1}])//Timing

V10 (z,y,x)

(i=Integrate[Boole[ineq],{z,-1,1},{y,-1,1},{x,-1,1}])//Timing

Centroid

Numerical

NIntegrate[{x,y,z}Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1}]//Chop//Timing

NIntegrate[{x,y,z}Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1},Method->"QuasiMonteCarlo",PrecisionGoal->3,MaxPoints->10^6]//Chop//Timing

NIntegrate[{x,y,z}Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1},Method->"QuasiMonteCarlo",PrecisionGoal->3,MaxPoints->10^7]//Chop//Timing

Symbolic (x,y,z) [gives z == 0]

(i=Integrate[{x,y,z} Boole[ineq],{x,-1,1},{y,-1,1},{z,-1,1}])//Timing

Symbolic (z,y,x) [gives y == 0]

(i=Integrate[{x,y,z} Boole[ineq],{z,-1,1},{y,-1,1},{x,-1,1}])//Timing

Symbolic (y,x,z)

(i=Integrate[{x,y,z} Boole[ineq],{y,-1,1},{x,-1,1},{z,-1,1}])//Timing

InertiaTensor

Numerical

With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ NIntegrate[{{y^2+z^2,-x y,-x z},
{0,z^2+x^2,-y z},
{0,0,x^2+y^2}}Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]]//Chop//Timing

With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ NIntegrate[{{y^2+z^2,-x y,-x z},
{0,z^2+x^2,-y z},
{0,0,x^2+y^2}}Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1},Method->"QuasiMonteCarlo",MaxPoints->10^6]]//Chop//Timing

Symbolic

Based on numerics, matrix should be diagonal with single nonzero element: (({{a, 0, 0}, {0, a, 0}, {0, 0, a}})), where a≈0.407619

(i=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[{{y^2+z^2,-x y,-x z},
{-x y,z^2+x^2,-y z},
{-x z,-y z,x^2+y^2}}Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing

Symbolic (Subscript[i, 11]) (x,y,z)

(i11=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[(y^2+z^2)Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing

Symbolic (Subscript[i, 11]) (x,z,y)

(i11=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[(y^2+z^2)Boole[ineq],
{x,-1,1},{z,-1,1},{y,-1,1}]])//Timing

Symbolic (Subscript[i, 11]) (y,x,z)

(i11=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[(y^2+z^2)Boole[ineq],
{y,-1,1},{x,-1,1},{z,-1,1}]])//Timing

Symbolic (Subscript[i, 11]) (y,z,x)

(i11=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[(y^2+z^2)Boole[ineq],
{y,-1,1},{z,-1,1},{x,-1,1}]])//Timing

Symbolic (Subscript[i, 12])

(i12=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[-x y Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing

(i12=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[-x y Boole[ineq],
{x,-1,1},{z,-1,1},{y,-1,1}]])//Timing

Symbolic (Subscript[i, 13])

(i13=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[-x z Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing

Symbolic (Subscript[i, 22])

(i22=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[(z^2+x^2)Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing

Symbolic (Subscript[i, 23])

(i23=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[-y z Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing

(i23=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[-y z Boole[ineq],
{y,-1,1},{x,-1,1},{z,-1,1}]])//Timing

Symbolic (Subscript[i, 33])

(i33=With[{ρ=(1/(16/3 (3+2 Sqrt[3]-4 Sqrt[2])))},ρ Integrate[(x^2+y^2)Boole[ineq],
{x,-1,1},{y,-1,1},{z,-1,1}]])//Timing