# Draw polytope with Graphics

How can I draw a polytope with the Graphics function? The documentation simply says that you can do it, but does not explain how. The example given only plots vertices, not the edges of the polytope. Using:

Graphics[Octagon]


gives an error. I also tried the following from a different question:

Graphics[Octagon & /@ Vertices[Octagon]]


and that does not work either. I also tried the following:

Graphics[Line[{{0, 0}, #}] & /@ Vertices[Octagon]]


and that does not work either. I also tried this:

Graphics[Line[{{0, 0}, #}] & /@ EdgeList[Octagon]]


and that gives an error as well. I also tried this:

Graphics[Line[{{0, 0}, #}] & /@ Faces[Octagon]]


and that does not work. It would be useful to have an answer that explains how this stuff works, because I just don't get it and the documentation does not explain enough that I can figure out the internal logic of these functions. The documentation page on Polytopes says it is a "tutorial", but there is no tutorial. It just lists the functions and then gives four short examples.

I almost got it to work with this:

Graphics[Line[Vertices[Octagon]]]


But it does not close up the last point.

• Graphics[{Red, RegularPolygon[8], White, Text[Style["STOP", 110]]}] Oct 14, 2016 at 16:32
• Nothing in the documentation for the Polytopes Package says you can use it with Graphics. But this seems to work Graphics@Polygon@Vertices@Octagon Oct 14, 2016 at 16:36
• you mean this?
– yode
Oct 14, 2016 at 16:37
• @yode - that is really odd. If you look at the resulting Graphics, you see they are using 1070 vertices to make an octagon!!! Oct 14, 2016 at 16:41
• If what you want is the outline of a polytope: Graphics[{Black, RegularPolygon[1, 8], White, RegularPolygon[0.95, 8]}] Oct 14, 2016 at 18:49

Graphics[Line[Append[Vertices[Octagon], First[Vertices[Octagon]]]]]

• Try Graphics[{FaceForm[None], EdgeForm[Black], Polygon[Vertices[Octagon]]}], or Graphics[Line[{##, #1} & @@ Vertices[Octagon]]]. Oct 15, 2016 at 2:43