1
$\begingroup$

I am trying to draw the 80th Johnson solid by LaTeX; I tried

PolyhedronData[{"Johnson", 80}]

and

PolyhedronData[{"Johnson", 80}, "Vertices"]

To draw this solid, I must determine the vertices of each face. How to find them?

P.S. I use Mathematica 11.2.

$\endgroup$
2
  • 1
    $\begingroup$ PolyhedronData[{"Johnson", 8}, {"Vertices", "FaceIndices"}] $\endgroup$
    – cvgmt
    Feb 5, 2021 at 9:03
  • $\begingroup$ BTW, I don't see {"Johnson", 80} in the output of PolyhedronData[]. $\endgroup$
    – user64494
    Feb 5, 2021 at 18:35

2 Answers 2

3
$\begingroup$
{vertices, faceindices} = PolyhedronData[{"Johnson", 80}, {"Vertices", "Faces"}];

Graphics3D[{RandomColor[], Opacity[.7], Polygon[vertices[[#]]]} & /@ faceindices,
  Boxed -> False]

enter image description here

Triangles and rectangles:

Row @ Table[Graphics3D[{RandomColor[], Opacity[.7], Polygon[vertices[[#]]]} & /@
     Select[faceindices, Length@# == k &],
  Boxed -> False, ImageSize -> Medium], {k, {3, 4}}]

enter image description here

Note: In versions 12.0+, replace "Faces" with "FaceIndices".

$\endgroup$
0
$\begingroup$

Too long for a comment. Unfortunately, concerning its plot, the result of

Graphics3D[{Glow[Yellow], EdgeForm[Gray], PolyhedronData["Johnson", "Polygons"]}, Lighting -> None]

enter image description here

is not satisfactory. I followed the documentation.

Addition. It appears the right command is

Graphics3D[{ Glow[Yellow], EdgeForm[Gray], 
PolyhedronData[{"Johnson", 80}, "Polygons"]}, Lighting -> None]

enter image description here and a simpler command

PolyhedronData[{"Johnson", 80}]

enter image description here

produces a nicer result.

$\endgroup$
3
  • $\begingroup$ Graphics3D[{Glow[Yellow], EdgeForm[Gray], PolyhedronData["Johnson", 80]}, Lighting -> None] produces an empty plot in red. $\endgroup$
    – user64494
    Feb 5, 2021 at 9:17
  • $\begingroup$ The result of Graphics3D[{Opacity[0.3], Glow[Yellow], EdgeForm[Gray], PolyhedronData["Johnson", "Polygons"]}, Lighting -> None] is unsatifactory too. I understand there are self-intersections here. Unfortunately, I don't find any example of such kind in the documentation. $\endgroup$
    – user64494
    Feb 5, 2021 at 9:54
  • $\begingroup$ It should be noticed the command Graphics3D[{Glow[Yellow], EdgeForm[Gray], PolyhedronData["Johnson", "Polygons"]}, Lighting -> None] produces no messages, but an incorrect plot. $\endgroup$
    – user64494
    Feb 5, 2021 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.