I am trying to create an Alberti's window figure as described in this question, in which a (three-dimensional) polyhedron (e.g., dodecahedron) is projected onto a (two-dimensional) plane. I realized that the previous approach and solution of projecting points is not quite what I need. Instead, I'd like to project two-dimensional faces (in this case pentagons). Everything works except the final stage. Here's how I proceed:
1) Here are the vertices of the dodecahedron:
myVertices = N@PolyhedronData["Dodecahedron", "Vertices"];
2) Here are the grouped indices of each pentagon face:
myFaces = PolyhedronData["Dodecahedron", "Faces"];
3) Here are the selected faces that are visible from the center of projection:
mySelectedFaces = myFaces[[#]] & /@ {2, 3, 5, 6, 7};
4) Here is the center of projection:
cop = {10, 0, 0};
5) Here are the three-dimensional cones defined by a pentagon face on the dodecahedron and the center of projection:
myCones = Join[#, {cop}] & /@ (myVertices[[#]] & /@ mySelectedFaces);
6) Here's the region mesh of just the first such cone:
myConeMesh = ConvexHullMesh[myCones[[1]]]
7) I'm projecting onto a plane defined by:
poly = Polygon[{{6, -2, -2}, {6, -2, 2}, {6, 2, 2}, {6, 2, -2}}];
8) If I create the union of the cone and the projection plane, I get just what I expect:
RegionUnion[myConeMesh, poly]
9) But of course I want instead the intersection of the cone and the projection plane. That should give me a pentagon floating in the plane of the projection plane. (I could then color it, render it however I wish, and so forth.) However, when I implement what I think should be the obvious function, I do not get the desired intersection:
RegionIntersection[myConeMesh, poly]
I have tried all manner of putting the elements in braces, creating Mesh
or ConvexHullMesh
, etc., without success. I thought the problem might stem from the embedding dimension, but both component regions are in three dimensions.
How can I compute the pentagon intersection region within the projection plane?