Szilassi Polyhedron

Author

Eric W. Weisstein
May 15, 2023

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Polyhedra/SzilassiPolyhedron.nb.

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

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

Graphic

Graphics3D[{PolyhedronData["SzilassiPolyhedron","Faces"]},Boxed->False,ImageSize->Small]

Graphics3D[{Opacity[.5],PolyhedronData["SzilassiPolyhedron","Faces"]},Boxed->False,ImageSize->Small]

Show[PolyhedronData["SzilassiPolyhedron","Region"],ImageSize->Small]

Properties

p=PolyhedronData[pname="SzilassiPolyhedron","Polyhedron"]

vol=PolyhedronData[pname,"Volume"]

Centroid

bug(407136): Volume returns "an outlandish number" when applied to PolyhedronData["SzilassiPolyhedron", "Polyhedron"]

PolyhedronData["SzilassiPolyhedron","Centroid"]

RegionCentroid

RegionCentroid[PolyhedronData["SzilassiPolyhedron","Region"]]

N[%,20]

RegionCentroid[PolyhedronData["SzilassiPolyhedron","Polyhedron"]]

GaussLaw

PolyhedronCentroid[PolyhedronData["SzilassiPolyhedron","Polyhedron"]]//Simplify

By dissection into convex pieces

xbar=((Total[RegionCentroid[#]Volume[#]&/@DissectedSzilassi])/(Total[Volume/@DissectedSzilassi]))

N[xbar,20]

Graphics3D[{DissectedSzilassi,Point[xbar]}]

((Total[Integrate[{x,y,z},{x,y,z}∈#]&/@DissectedSzilassi])/(Total[Integrate[1,{x,y,z}∈#]&/@DissectedSzilassi]))

Circumsphere

sphere=PolyhedronData[pname,"Circumsphere"]

sphere=Circumsphere[p]

(sphere=MyCircumsphere[p])//Timing

Graphics3D[{{Opacity[.2],Yellow,sphere},p},Boxed->False]

Compound

PolyhedronData[pname,"Compound"]

Convex

PolyhedronData[pname,"Convex"]

ConvexPolyhedronQ[p]

DihedralAngles

PolyhedronData[pname,"DihedralAngles"]//Tally

SimplifyNumericallyDistinct[DihedralAngles[p]]//Tally

EdgeCount

PolyhedronData[pname,"EdgeCount"]

EdgeLengths

PolyhedronData[pname,"EdgeLengths"]

PolyhedronData[pname,"Lines"]/.Line[l_]:>EuclideanDistance@@l//FullSimplify//Union//Quiet

lens=SimplifyNumericallyDistinct[PolyhedronEdgeLengths[p]];//Quiet

(distinctlens=Mean/@Split[Sort[lens],Abs[#1-#2]<1.*^-10&])//N//Quiet

v=PolyhedronCoordinates[p];

colors=With[{n=Length[distinctlens]},Table[Hue[i/n],{i,0,n-1}]]

Graphics3D[{Thick,Sequence@@Nearest[Thread[distinctlens->colors],EuclideanDistance@@v[[#]]],Line[v[[#]]]}&/@PolyhedronEdges[p],Boxed->False]//Quiet

FaceCount

PolyhedronData[pname,"FaceCount"]

Faces

GeneralizedDiameter

PolyhedronData[pname,"GeneralizedDiameter"]

GeneralizedDiameter[p]//FullSimplify//Quiet

InertiaTensor

bug(407136): Volume returns "an outlandish number" when applied to PolyhedronData["SzilassiPolyhedron", "Polyhedron"]

PolyhedronData[pname,"InertiaTensor"]

MomentOfInertia [wrong]

((MomentOfInertia[p,{0,0,0}])/vol)//FullSimplify

GaussLaw

PolyhedronInertiaTensor[p]

By dissection into convex pieces

((Total[MomentOfInertia[#,{0,0,0}]&/@DissectedSzilassi])/(Total[Volume/@DissectedSzilassi]))

N[%,20]

Insphere

PolyhedronData[pname,"Insphere"]

Insphere[p]

sphere=MyInsphere[p]

Graphics3D[{{Opacity[.5],p},{Red,sphere}},Boxed->False]

MeanCylindricalRadius

PolyhedronData[pname,"MeanCylindricalRadius"]

Integrate over polyhedron

((NIntegrate[(Sqrt[(x^2)+(y^2)]),{x,y,z}∈p])/vol)//Timing

Integrate

(i=((Integrate[(Sqrt[(x^2)+(y^2)]),{x,y,z}∈p])/vol)//FullSimplify)//Timing

Divergence theorem

pname

(rxy=MeanCylindricalRadius[p,Debug->True])//Timing

FullSimplify[rxy]

CAD

cad=CylindricalDecomposition[PolyhedronData[pname,"RegionFunction"][x,y,z],{x,y,z},"Function"]

((NIntegrate[(Sqrt[(x^2)+(y^2)])Boole[cad],{x,y,z}∈FullRegion[3]])/vol)

((Integrate[(Sqrt[(x^2)+(y^2)])Boole[cad],{x,y,z}∈FullRegion[3]])/vol)//Timing

Inequalities

{{xmin,xmax},{ymin,ymax},{zmin,zmax}}=MinMax/@Transpose[PolyhedronCoordinates[p]]

ineq=PolyhedronData[pname,"RegionFunction"][x,y,z]

(i1=Integrate[Boole[ineq](Sqrt[(x^2)+(y^2)]),{z,zmin,zmax}])//Timing

NIntegrate[(i1/vol),{x,xmin,xmax},{y,ymin,ymax}]

(i2=Integrate[(i1/vol),{x,xmin,xmax},{y,ymin,ymax}])//Timing

MeanSquareCylindricalRadius

PolyhedronData[pname,"MeanSquareCylindricalRadius"]

((NIntegrate[(x^2)+(y^2),{x,y,z}∈p])/vol)//Timing

Integrate [wrong]

(i=((Integrate[(x^2)+(y^2),{x,y,z}∈p])/vol))//Timing

Divergence theorem

(rxy=MeanSquareCylindricalRadius[p]//FullSimplify)//Timing

MeanSphericalRadius

PolyhedronData[pname,"MeanSphericalRadius"]

((NIntegrate[(Sqrt[(x^2)+(y^2)+(z^2)]),{x,y,z}∈p])/vol)//Timing

Integrate

(i=((Integrate[(Sqrt[(x^2)+(y^2)+(z^2)]),{x,y,z}∈p])/vol))//Timing

Divergence theorem

(rxy=MeanSphericalRadius[p,Debug->True])//Timing

Integrate over z first

{{xmin,xmax},{ymin,ymax},{zmin,zmax}}=MinMax/@Transpose[PolyhedronCoordinates[p]]

ineq=PolyhedronData[pname,"RegionFunction"][x,y,z]

(i1=Integrate[Boole[ineq](Sqrt[(x^2)+(y^2)+(z^2)]),{z,zmin,zmax}])//Timing

NIntegrate[(i1/vol),{x,xmin,xmax},{y,ymin,ymax}]

(i2=Integrate[(i1/vol),{x,xmin,xmax},{y,ymin,ymax}])//Timing

MeanSquareSphericalRadius

PolyhedronData[pname,"MeanSquareSphericalRadius"]

N[%]

((NIntegrate[(x^2)+(y^2)+(z^2),{x,y,z}∈p])/vol)//Timing

Integrate

(i=((Integrate[(x^2)+(y^2)+(z^2),{x,y,z}∈p])/vol))//Timing

Divergence theorem

(rxy=MeanSquareSphericalRadius[p]//FullSimplify)//Timing

Integrate over z first

{{xmin,xmax},{ymin,ymax},{zmin,zmax}}=MinMax/@Transpose[PolyhedronCoordinates[p]]

ineq=PolyhedronData[pname,"RegionFunction"][x,y,z]

(i1=Integrate[Boole[ineq]((x^2)+(y^2)+(z^2)),{z,zmin,zmax}])//Timing

NIntegrate[(i1/vol),{x,xmin,xmax},{y,ymin,ymax}]

(i2=Integrate[(i1/vol),{x,xmin,xmax},{y,ymin,ymax}])//Timing

Midsphere

sphere=PolyhedronData[pname,"Midsphere"]

(sphere=Midsphere[p])//Timing

(sphere=Midsphere[p,Method->"PointLineDistance"])//Timing

Graphics3D[{{Opacity[.5],Yellow,p},{Red,sphere}},Boxed->False]

Region

PolyhedronData[pname,"Region"]

RegionFunction

PolyhedronData[pname,"RegionFunction"]

Collect[#,{x,y,z},RootReduce]&/@PolyhedronInequalities[p,{x,y,z}]

FullSimplify[%]

SimplePolyhedron

PolyhedronData[pname,"Simple"]

bug(388294): SimplePolyhedronQ[PolyhedronData[poly, "Polyhedron"]] incorrectly returns True for "CsazarPolyhedron" and "SzilassiPolyhedron"

SimplePolyhedronQ[p]

Skeleton

PolyhedronData["SzilassiPolyhedron","Skeleton"]

PolyhedronData["SzilassiPolyhedron","Skeleton","Name"]

Graph[UndirectedEdge@@@PolyhedronData["SzilassiPolyhedron","Edges"]]

RecognizeGraph[%]

SurfaceArea

PolyhedronData["SzilassiPolyhedron","SurfaceArea"]

N[%]

SurfaceArea

SurfaceArea[PolyhedronData["SzilassiPolyhedron","Region"]]//FullSimplify

N[%]

SurfaceArea[PolyhedronData["SzilassiPolyhedron","Polyhedron"]]//FullSimplify

PolyhedronSurfaceArea

PolyhedronSurfaceArea[PolyhedronData["SzilassiPolyhedron","Polyhedron"]]//FullSimplify

Volume

PolyhedronData[pname,"Volume"]

Volume V12.2 [wrong]

bug(407136): Volume returns "an outlandish number" when applied to PolyhedronData["SzilassiPolyhedron", "Polyhedron"]

Volume[PolyhedronData["SzilassiPolyhedron","Polyhedron"]]//Simplify

N[%]

Volume V13.3

$Version

Volume[PolyhedronData["SzilassiPolyhedron","Polyhedron"]]//Timing

Volume by PolyhedronDecomposition V12.2 [wrong]

Length[pieces=PolyhedronDecomposition[p]]

Length[PolyhedronCoordinates[#]]&/@pieces//Union

Total[Volume/@pieces]

Volume by PolyhedronDecomposition V13.3 [wrong]

bug(436309): Total[Volume /@ PolyhedronDecomposition[PolyhedronData["SzilassiPolyhedron", "Polyhedron"]]] gives wrong result

Length[pieces=PolyhedronDecomposition[p]]

Length[PolyhedronCoordinates[#]]&/@pieces//Union

Total[Volume/@pieces]

Direct

PolyhedronVolume[p,Method->"Direct"]//Simplify

GaussLaw

PolyhedronVolume[p,Method->"GaussLaw"]//Simplify

MonteCarlo

reg=PolyhedronData["SzilassiPolyhedron","Polyhedron"]

SimplePolyhedronQ[reg]

Element[{0,0,0},reg]

RegionMember[reg,{0,0,0}]

RegionWithin[reg,Point[{0,0,0}]]

Graphics3D[{reg,PointSize[.02],Point[{0,0,0}]}]

DiscretizeRegion[reg]

PolyhedronData["SzilassiPolyhedron","CoordinateBounds"]

{24/5,126/25,24/5}#&/@RandomReal[{-1,1},{10,3}]

By dissection into convex pieces

v=PolyhedronData["SzilassiPolyhedron","VertexCoordinates"];

Graphics3D[{
PolyhedronData["SzilassiPolyhedron","GraphicsComplex"],MapIndexed[Text[#2[[1]],#,Background->White]&,v]}]

p1=RegionIntersection[InfiniteLine[v[[{2,3}]]],InfiniteLine[v[[{4,13}]]]][[1]]

p2=RegionIntersection[InfiniteLine[v[[{2,11}]]],InfiniteLine[v[[{12,13}]]]][[1]]

p3=RegionIntersection[InfiniteLine[v[[{5,10}]]],InfiniteLine[v[[{6,8}]]]][[1]]

p4=RegionIntersection[InfiniteLine[v[[{9,14}]]],InfiniteLine[v[[{7,8}]]]][[1]]

p5=RegionIntersection[InfiniteLine[v[[{9,7}]]],InfiniteLine[v[[{5,10}]]]][[1]]

Graphics3D[{PolyhedronData["SzilassiPolyhedron","GraphicsComplex"],MapIndexed[Text[#2[[1]],#,Background->White]&,v],
PointSize[.03],
pts={Red,Point[p1],
Blue,Point[p2],
Green,Point[p3],
Yellow,Point[p4],
Black,Point[p5]}
}]

Graphics3D[reg1=ConvexHullRegion[Join[v[[{1,2,14,13}]],{p1,p2}]]]

Graphics3D[reg2=ConvexHullRegion[Join[v[[{3,4,5,6,10}]],{p1,p3}]]]

Graphics3D[reg3=ConvexHullRegion[Join[v[[{5,9,11,12}]],{p2,p5}]]]

Graphics3D[{
{Green,Opacity[.2],PolyhedronData["SzilassiPolyhedron","GraphicsComplex"]},
reg1,reg2,reg3,
MapIndexed[Text[#2[[1]],#,Background->White]&,v],
PointSize[.05],pts
}]

Graphics3D[reg4=ConvexHullRegion[Join[v[[{7,8}]],{p3,p5}]]]

Graphics3D/@{reg1,reg2,reg3,reg4}

Show[%]

DissectedSzilassi={reg1,reg2,reg3,reg4}

SimplePolyhedronQ/@DissectedSzilassi

ConvexPolyhedronQ/@DissectedSzilassi

Dissected properties

p=PolyhedronData[pname="SzilassiPolyhedron","Polyhedron"]

InertiaTensor

PolyhedronData["SzilassiPolyhedron","InertiaTensor"]

<<MathWorld`Surfaces`

is=Integrate[InertiaMatrix[{x,y,z}],{x,y,z}∈#]&/@DissectedSzilassi

((Total[is])/(PolyhedronData[pname,"Volume"]))

MeanCylindricalRadius

((Total[NIntegrate[(Sqrt[(x^2)+(y^2)]),{x,y,z}∈#]&/@DissectedSzilassi])/(PolyhedronData[pname,"Volume"]))//Timing

(i=((Integrate[(Sqrt[(x^2)+(y^2)]),{x,y,z}∈p])/(PolyhedronData[pname,"Volume"])))//Timing

N[i]

MeanSquareCylindricalRadius

((Total[NIntegrate[(x^2)+(y^2),{x,y,z}∈#]&/@DissectedSzilassi])/(PolyhedronData[pname,"Volume"]))//Timing

(i=((Total[Integrate[(x^2)+(y^2),{x,y,z}∈#]&/@DissectedSzilassi])/(PolyhedronData[pname,"Volume"])))//Timing

N[i]

MeanSphericalRadius

((NIntegrate[(Sqrt[(x^2)+(y^2)+(z^2)]),{x,y,z}∈p])/(PolyhedronData[pname,"Volume"]))//Timing

(i=((Integrate[(Sqrt[(x^2)+(y^2)+(z^2)]),{x,y,z}∈p])/(PolyhedronData[pname,"Volume"])))//Timing

N[i]

MeanSquareSphericalRadius

((Total[NIntegrate[(x^2)+(y^2)+(z^2),{x,y,z}∈#]&/@DissectedSzilassi])/(PolyhedronData[pname,"Volume"]))//Timing

(i=((Total[Integrate[(x^2)+(y^2)+(z^2),{x,y,z}∈#]&/@DissectedSzilassi])/(PolyhedronData[pname,"Volume"])))//Timing

N[i]

Volume

vs=Volume/@DissectedSzilassi

Total[vs]

N[(41808/625),20]