platonicsolids

Platonic solids in Tikz
git clone https://git.tronto.net/platonicsolids
Download | Log | Files | Refs | README

icosahedron.tex (2069B)


      1 \input{settings.ttt}
      2 
      3 \begin{document}
      4 \begin{tikzpicture}[scale=2, line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
      5 
      6 \input{coord-ico.tex}
      7 
      8 % Background varying in size depending on the main figure
      9 \fill[color=white] (-2,-2) rectangle (2,2);
     10 
     11 \filldraw[very thick, draw=my-color-draw-main,
     12 	  fill=my-color-fill-main, fill opacity = 0.5]
     13 	(P0) -- (P2) -- (P8) -- cycle;
     14 \filldraw[very thick, draw=my-color-draw-main,
     15 	  fill=my-color-fill-main, fill opacity = 0.3]
     16 	(P0) -- (P2) -- (P9) -- cycle;
     17 \filldraw[very thick, draw=my-color-draw-main,
     18 	  fill=my-color-fill-main, fill opacity = 0.7]
     19 	(P0) -- (P8) -- (P4) -- cycle;
     20 \filldraw[very thick, draw=my-color-draw-main,
     21 	  fill=my-color-fill-main, fill opacity = 0.4]
     22 	(P0) -- (P9) -- (P6) -- cycle;
     23 \filldraw[very thick, draw=my-color-draw-main,
     24 	  fill=my-color-fill-main, fill opacity = 0.7]
     25 	(P0) -- (P4) -- (P6) -- cycle;
     26 
     27 \filldraw[very thick, draw=my-color-draw-main,
     28 	  fill=my-color-fill-main, fill opacity = 0.4]
     29 	(P9) -- (P11) -- (P6) -- cycle;
     30 \filldraw[very thick, draw=my-color-draw-main,
     31 	  fill=my-color-fill-main, fill opacity = 0.7]
     32 	(P1) -- (P11) -- (P6) -- cycle;
     33 \filldraw[very thick, draw=my-color-draw-main,
     34 	  fill=my-color-fill-main, fill opacity = 0.7]
     35 	(P1) -- (P4) -- (P6) -- cycle;
     36 
     37 \filldraw[very thick, draw=my-color-draw-main,
     38 	  fill=my-color-fill-main, fill opacity = 0.9]
     39 	(P4) -- (P10) -- (P8) -- cycle;
     40 \filldraw[very thick, draw=my-color-draw-main,
     41 	  fill=my-color-fill-main, fill opacity = 0.9]
     42 	(P4) -- (P10) -- (P1) -- cycle;
     43 
     44 \draw[very thick, draw=my-color-draw-main, dashed] (P1) -- (P3);
     45 \draw[very thick, draw=my-color-draw-main, dashed] (P11) -- (P3) -- (P10);
     46 \draw[very thick, draw=my-color-draw-main, dashed] (P11) -- (P7) -- (P9);
     47 \draw[very thick, draw=my-color-draw-main, dashed] (P2) -- (P7) -- (P3);
     48 \draw[very thick, draw=my-color-draw-main, dashed] (P5) -- (P7);
     49 \draw[very thick, draw=my-color-draw-main, dashed] (P2) -- (P5) -- (P3);
     50 \draw[very thick, draw=my-color-draw-main, dashed] (P8) -- (P5) -- (P10);
     51 
     52 
     53 \end{tikzpicture}
     54 \end{document}
     55