# Technique for drawing polyhedron cutaway

Here is a graphic I drew with an earlier version of Mathematic (probably version 6) which I no longer have available:

At the time Polyhedra was an external package, and I produced the cut-away by truncating a list of component polyhedra of the truncated icosahedron before drawing.

Recent versions of Mathematica have an entirely different (and now integrated) set of polyhedron functions, that look nothing like what I used before. Can anyone suggest a strategy for redrawing this figure now?

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Aug 9, 2016 at 0:39
• I guess you're referring to PolyhedronData["TruncatedIcosahedron"]? Aug 9, 2016 at 0:42
• Do you still have the old code, at least? Can you elaborate on how you "truncat(ed) a list of component polyhedra of the truncated icosahedron"? Aug 9, 2016 at 4:42

SeedRandom[3]; (* for reproducibility *)
With[{poly = PolyhedronData["TruncatedIcosahedron"] /.
Polygon[pp_] :> Polygon[RandomSample[pp, 24]]},
With[{r0 = PolyhedronData["TruncatedIcosahedron", "Circumradius"],
r1 = 1,                   (* input: r1 = inner boundary vertex distance *)
r2 = 2},                  (* input: r2 = outer boundary vertex distance *)
With[{pts = First@Cases[poly,
GraphicsComplex[p_, e__] :> Flatten[{p *(r1/r0), p*(r2/r0)}, 1],
Infinity]},
Graphics3D[GraphicsComplex[pts,
{EdgeForm[], Lighter@ColorData[97, 2],
Cases[poly, Polygon[p_] :> Polygon@Join[p, p + Length[pts]/2], Infinity],
Cases[poly,
Polygon[p_] :> Polygon[
Flatten[
Join[#, Reverse@# + Length[pts]/2] & /@ Partition[#, 2, 1, 1] & /@ p,
1]],
Infinity]}
], PlotRange -> All, Options[poly]]]]]

• We remove the neiborhoods of one of the face of TruncatedIcosahedron.

• After we select the polygons, we add the original {0,0,0} to each polygons and use ConvexHullMesh to construct some pyramid.

g = UndirectedEdge @@@
face = 1;
indexs =
Complement[VertexList[g], Append[AdjacencyList[g, face], face]];
polys = PolyhedronData["TruncatedIcosahedron", "Polygons"][[indexs]];
Graphics3D[{polys /.
Polygon[pts_] :> ConvexHullMesh[Append[pts, {0, 0, 0}]],
SphericalPlot3D[1, {θ, 0, Pi}, {ϕ, 0, 2 Pi}][[1]]},
Boxed -> False]

• To view the sphere, we remove one more polygon.
Clear["Global`*"];
g = UndirectedEdge @@@
face = 1;
indexs1 = AdjacencyList[g, face, 1];
indexs2 = AdjacencyList[g, face, 2];
indexs =
Complement[VertexList[g],
Join[{face}, indexs1, {Complement[indexs2, indexs1][[5]]}]];
polys = PolyhedronData["TruncatedIcosahedron", "Polygons"][[indexs]];
Graphics3D[{polys /.
Polygon[pts_] :> ConvexHullMesh[Append[pts, {0, 0, 0}]],
SphericalPlot3D[1, {θ, 0, Pi}, {ϕ, 0, 2 Pi}][[1]]},
Boxed -> False]

Remove faces visible from a given view point and extrude the remaining faces:

ClearAll[visibleVerts, facesKept, intrudeFace]
visibleVerts[viewp_] := Intersection[
MeshCoordinates[#],
MeshCoordinates[
RegionDifference[ConvexHullMesh[Prepend[MeshCoordinates[#], viewp]], #]]] &

facesKept[viewp_] := Select[x |-> DisjointQ[x[[1]], visibleVerts[viewp] @ #]] @
MeshPrimitives[#, 2] &

intrudeFace[scaledThickness_, p_ : {0, 0, 0}] := ConvexHullMesh[Join[First @ #,
ScalingTransform[(1 - scaledThickness) {1, 1, 1}, p] @ First @ #], ##2] &

Examples:

{bmr, cb} = PolyhedronData["TruncatedIcosahedron",
{"BoundaryMeshRegion", "CoordinateBounds"}];

zh = 1.2;
vp = {0, 0, zh cb[[-1, -1]] };
t = .3;

Row[{Graphics3D[{Opacity[.5], Red, facesKept[vp][bmr]},
Boxed -> False, ImageSize -> Medium],
Show[intrudeFace[t] /@ facesKept[vp][bmr], ImageSize -> Medium],
Show[intrudeFace[t][#, MeshCellStyle -> {{2, All} :> RandomColor[]}] & /@
facesKept[vp][bmr],
Graphics3D[{Red,
Ball[{0, 0, 0},
(1 - t) PolyhedronData["TruncatedIcosahedron", "Circumradius"]]}],
ImageSize -> Medium]},
Spacer[10]]

Use zh = 1.5 to get

and zh = 4 to get

With zh = 1.1 combined with varies thickness values we get

Multicolumn[
Table[Show[intrudeFace[s] /@ facesKept[vp][bmr],
Lighting -> "Neutral", ImageSize -> Medium,
PlotLabel -> Row[{"thicknes: ", s}]], {s, {.1, .3, .5, 1}}],
2, Dividers -> All, Appearance -> "Horizontal"]