ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 27 Sep 2015 04:51:41 +0200Return vertices of a Schlegel projectionhttps://ask.sagemath.org/question/29607/return-vertices-of-a-schlegel-projection/ I would like to have the vertices of a Schlegel's projection of a dodecahedron, octahedron, and an icosahedron, to plot them using tikz in a LaTeX document. Can I generate a tikz plot using SAGE?
Thanks.
Sun, 27 Sep 2015 03:07:38 +0200https://ask.sagemath.org/question/29607/return-vertices-of-a-schlegel-projection/Answer by fidbc for <p>I would like to have the vertices of a Schlegel's projection of a dodecahedron, octahedron, and an icosahedron, to plot them using tikz in a LaTeX document. Can I generate a tikz plot using SAGE? </p>
<p>Thanks.</p>
https://ask.sagemath.org/question/29607/return-vertices-of-a-schlegel-projection/?answer=29613#post-id-29613If this helps, you can get TikZ/tkz code from sage for the Dodecahedral graph (and similarly for the Icosahedral graph) as follows.
g=graphs.DodecahedralGraph()
g.set_latex_options(tkz_style = 'Art')
print latex(g)
# very long output
Sample output after compiling the LaTeX code:
![image description](/upfiles/14433221371752325.png)
However if you just want the coordinates of the vertices, then `g.get_pos()` will return a dictionary containing the coordinates.Sun, 27 Sep 2015 04:51:41 +0200https://ask.sagemath.org/question/29607/return-vertices-of-a-schlegel-projection/?answer=29613#post-id-29613