Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 123 characters in body
Source Link
Tyler Durden
  • 4.1k
  • 16
  • 48

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.

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.

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.

added 252 characters in body
Source Link
Tyler Durden
  • 4.1k
  • 16
  • 48

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.

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. 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.

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.

added 113 characters in body
Source Link
Tyler Durden
  • 4.1k
  • 16
  • 48

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. 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.

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.

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. 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.

Source Link
Tyler Durden
  • 4.1k
  • 16
  • 48
Loading