# How to plot the four regular star polyhedra with tikz?

I can plot the regular convex polyhedra, for examples

\begin{tikzpicture}[scale=1.0]
\tikzstyle{every node}=[circle,fill=blue!20,inner sep=0pt,minimum size=0.4cm]
\foreach \y[count=\a] in {10,9,4}
{\pgfmathtruncatemacro{\kn}{120*\a-90}
\node at (\kn:3) (b\a) {\small \y};}
\foreach \y[count=\a] in {8,7,2}
{\pgfmathtruncatemacro{\kn}{120*\a-90}
\node at (\kn:2.2) (d\a) {\small \y};}
\foreach \y[count=\a] in {1,5,6}
{\pgfmathtruncatemacro{\jn}{120*\a-30}
\node at (\jn:1.5) (a\a) {\small \y};}
\foreach \y[count=\a] in {3,11,12}
{\pgfmathtruncatemacro{\jn}{120*\a-30}
\node at (\jn:3) (c\a) {\small \y};}
\draw[dashed] (a1)--(a2)--(a3)--(a1);
\draw[ultra thick] (d1)--(d2)--(d3)--(d1);
\foreach \a in {1,2,3}
{\draw[dashed] (a\a)--(c\a);
\draw[ultra thick] (d\a)--(b\a);}
\draw[ultra thick] (c1)--(b1)--(c3)--(b3)--(c2)--(b2)--(c1);
\draw[ultra thick] (c1)--(d1)--(c3)--(d3)--(c2)--(d2)--(c1);
\draw[dashed] (b1)--(a1)--(b2)--(a2)--(b3)--(a3)--(b1);
\end{tikzpicture}


But I just do not know how to plot the four regular star polyhedra with tikz properly (a pseudo-3D shape, the number in the vertex is not necessary.). And I didn't find any packages which may be helpful to this question. Any comments or answers will be appreciated! Any other methods in tex is also welcome!

• Hi, please complete your example in order to make it compilable. You might be better of with inserting a picture of what you want to get. And explain, what you have tried and where you failed! – LaRiFaRi Sep 17 '14 at 15:20
• – cfr Sep 17 '14 at 20:44
• @LaRiFaRi Thanks! I just do not know how to try like I have done for the convex ones. – Eden Harder Sep 18 '14 at 1:41

You could start by specifying the coordinates in 3D (obtained from Sacred Geometry):

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\def \phi {1.617}
\begin{tikzpicture}[
x={(-0.86in, -0.5in)}, y = {(0.86in, -0.5in)}, z = {(0, 1in)},
rotate = 22,
scale = 0.6,
every node/.style = {
circle, fill = blue!20, inner sep = 0pt, minimum size = 0.5cm
},
foreground/.style = { ultra thick },
background/.style = { dashed }
]
\coordinate (9) at (0, -\phi*\phi,  \phi);
\coordinate (8) at (0,  \phi*\phi,  \phi);
\coordinate (12) at (0,  \phi*\phi, -\phi);
\coordinate (5) at (0, -\phi*\phi, -\phi);
\coordinate (7) at ( \phi, 0,  \phi*\phi);
\coordinate (3) at (-\phi, 0,  \phi*\phi);
\coordinate (6) at (-\phi, 0, -\phi*\phi);
\coordinate (4) at ( \phi, 0, -\phi*\phi);
\coordinate (2) at ( \phi*\phi,  \phi, 0);
\coordinate (10) at (-\phi*\phi,  \phi, 0);
\coordinate (1) at (-\phi*\phi, -\phi, 0);
\coordinate (11) at ( \phi*\phi, -\phi, 0);

\draw[foreground] (10) -- (3) -- (8) -- (10) -- (12) -- (8);
\draw[foreground] (4) -- (12) -- (2) -- (4) -- (11) -- (2);
\draw[foreground] (9) -- (3) -- (7) -- (9) -- (11) -- (7);
\draw[foreground] (7) -- (8) -- (2) -- cycle;
\draw[background] (12) -- (6) -- (10) -- (1) -- (6) -- (5) -- (1)
-- (9) -- (5) -- (11);
\draw[background] (5) -- (4) -- (6);
\draw[background] (3) -- (1);
\foreach \n in {1,...,12}
\node at (\n) {\n};
\end{tikzpicture}
\end{document}


Drawing the star is then just a matter of connecting up the correct coordinates. Unfortunately, this will get ugly since tikz doesn't do "real" 3D drawing. I got this far before I decided the result would end up just a mess of lines.

To do this right, you probably need a better 3D rendering engine, such as asymptote.

Update

As requested, here's the code I used to draw the polyhedron above.

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\def \phi {1.617}
\begin{tikzpicture}[
x={(-0.86in, -0.5in)}, y = {(0.86in, -0.5in)}, z = {(0, 1in)},
rotate = 22,
scale = 0.6,
every node/.style = {
circle, fill = blue!20, inner sep = 0pt, minimum size = 0.5cm
},
foreground/.style = { ultra thick },
background/.style = { dashed }
]
\coordinate (9) at (0, -\phi*\phi,  \phi);
\coordinate (8) at (0,  \phi*\phi,  \phi);
\coordinate (12) at (0,  \phi*\phi, -\phi);
\coordinate (5) at (0, -\phi*\phi, -\phi);
\coordinate (7) at ( \phi, 0,  \phi*\phi);
\coordinate (3) at (-\phi, 0,  \phi*\phi);
\coordinate (6) at (-\phi, 0, -\phi*\phi);
\coordinate (4) at ( \phi, 0, -\phi*\phi);
\coordinate (2) at ( \phi*\phi,  \phi, 0);
\coordinate (10) at (-\phi*\phi,  \phi, 0);
\coordinate (1) at (-\phi*\phi, -\phi, 0);
\coordinate (11) at ( \phi*\phi, -\phi, 0);

\coordinate (13) at ( \phi, 0,  1 / \phi);
\coordinate (14) at (-\phi, 0,  1 / \phi);
\coordinate (15) at (-\phi, 0, -1 / \phi);
\coordinate (16) at ( \phi, 0, -1 / \phi);
\coordinate (17) at ( 1 / \phi,  \phi, 0);
\coordinate (18) at ( 1 / \phi, -\phi, 0);
\coordinate (19) at (-1 / \phi, -\phi, 0);
\coordinate (20) at (-1 / \phi,  \phi, 0);
\coordinate (21) at (0,  1 / \phi,  \phi);
\coordinate (22) at (0,  1 / \phi, -\phi);
\coordinate (23) at (0, -1 / \phi, -\phi);
\coordinate (24) at (0, -1 / \phi,  \phi);
\coordinate (25) at ( 1,  1,  1);
\coordinate (26) at ( 1, -1,  1);
\coordinate (27) at (-1, -1,  1);
\coordinate (28) at (-1,  1,  1);
\coordinate (29) at (-1,  1, -1);
\coordinate (30) at ( 1,  1, -1);
\coordinate (31) at ( 1, -1, -1);
\coordinate (32) at (-1, -1, -1);

\draw[background] (12) -- (6) -- (10) (1) -- (6) -- (5) -- (1)
(9) -- (5) -- (11);
\draw[background] (5) -- (4) -- (6);
\draw[background]
(3) -- (27) (3) -- (14) (24) -- (27) -- (14) -- (28) -- (21) -- cycle
(14) -- (1) -- (27);
\draw[foreground] (10) -- (12) -- (8);
\draw[foreground] (4) -- (12) -- (2) -- (4) -- (11) -- (2);
\draw[foreground] (7) -- (11) -- (9);
\draw[foreground] (8) -- (2) -- (7);
\draw[foreground] (3) -- (24) (3) -- (21) (3) -- (28)
(10) -- (14) (27) -- (9) -- (8) -- (28) (24) -- (7) -- (10);
\end{tikzpicture}
\end{document}

• Thanks very much! Could you give the picture of the star one to show what is it like? – Eden Harder Sep 19 '14 at 1:25
• Apologies, I don't quite understand what you're asking for. Did you want to see the tikz code? – Derek Sep 19 '14 at 1:35
• Yeah, could you provide it? – Eden Harder Sep 19 '14 at 1:39
• @EdenHarder I just added it. – Derek Sep 19 '14 at 18:52

Just for typing exercise with PSTricks.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-node,pst-plot}
\def\Atom#1{%
\begin{pspicture}(-4,-4)(4,4)
\rput(0,0){$n=#1$}