Function Repository Resource:

PolyhedronFaceReflect

Source Notebook

Reflect a polyhedron over a given face

Contributed by: Ed Pegg Jr

ResourceFunction["PolyhedronFaceReflect"][polyhedron,k]

reflects polyhedron over its kth face.

Details

The polyhedron can be given as a Polyhedron object containing a list of vertices and a list of vertex indices.

Examples

Basic Examples (3) 

In the octahedron given below, a list of vertices is followed by a list of faces (vertex indices):

In[1]:=
octa = Polyhedron[{{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}}, {{1, 2, 4}, {1, 3, 2}, {1, 4, 5}, {1, 5, 3}, {2, 3, 6}, {2, 6, 4}, {3, 5, 6}, {4, 6, 5}}];

Reflect the octahedron over its first face:

In[2]:=
Graphics3D[{octa, ResourceFunction["PolyhedronFaceReflect"][octa, 1] }, Boxed -> False]
Out[2]=

Make a ring of eight octahedra:

In[3]:=
Graphics3D[
 FoldList[ResourceFunction["PolyhedronFaceReflect"], octa, {1, 2, 8, 1, 7, 8, 2}], Boxed -> False]
Out[3]=

Scope (2) 

Reflect a dodecahedron over its first face:

In[4]:=
dod = Dodecahedron[];
Graphics3D[{Opacity[2/3], dod, ResourceFunction["PolyhedronFaceReflect"][dod, 1] }, Boxed -> False]
Out[5]=

Reflect the snub disphenoid over its fifth face:

In[6]:=
snub = PolyhedronData["SnubDisphenoid", "Polyhedron"];
Graphics3D[{Opacity[2/3], snub, ResourceFunction["PolyhedronFaceReflect"][snub, 5] }, Boxed -> False]
Out[7]=

Neat Examples (3) 

Make a perfect ring of twelve 4-antiprisms:

In[8]:=
anti4 = Polyhedron[{{1, -1, 
Root[-1 + 2 #^4& , 1, 0]}, {-1, -1, 
Root[-1 + 2 #^4& , 1, 0]}, {-1, 1, 
Root[-1 + 2 #^4& , 1, 0]}, {1, 1, 
Root[-1 + 2 #^4& , 1, 0]}, {2^Rational[1, 2], 0, 
Root[-1 + 2 #^4& , 2, 0]}, {0, 2^Rational[1, 2], 
Root[-1 + 2 #^4& , 2, 0]}, {-2^Rational[1, 2], 0, 
Root[-1 + 2 #^4& , 2, 0]}, {0, -2^Rational[1, 2], 
Root[-1 + 2 #^4& , 2, 0]}}, {{1, 2, 3, 4}, {5, 6, 7, 8}, {1, 8, 2}, {
    2, 7, 3}, {3, 6, 4}, {4, 5, 1}, {1, 5, 8}, {2, 8, 7}, {3, 7, 6}, {
    4, 6, 5}}];
Graphics3D[
 FoldList[ResourceFunction["PolyhedronFaceReflect"], anti4, {10, 1, 8, 9, 1, 7, 8, 1, 10, 7, 1}], Boxed -> False]
Out[9]=

Make a spiral of tetrahedra (the Boerdijk–Coxeter helix):

In[10]:=
Graphics3D[
 FoldList[ResourceFunction["PolyhedronFaceReflect"], Tetrahedron[], {1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}], Boxed -> False]
Out[10]=

Compare with the result of TetrahelixMesh:

In[11]:=
ResourceFunction["TetrahelixMesh"][13, -1]
Out[11]=

Make a chain of icosahedra:

In[12]:=
Graphics3D[
 FoldList[ResourceFunction["PolyhedronFaceReflect"], Icosahedron[], {14, 1, 17, 13, 11}], Boxed -> False]
Out[12]=

Version History

  • 1.0.0 – 31 January 2022

Related Resources

License Information