platonicsolids

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

cube.tex (898B)


      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-cube.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.7]
     13 	(P0) -- (P1) -- (P3) -- (P2) -- cycle;
     14 
     15 \filldraw[very thick, draw=my-color-draw-main,
     16 	  fill=my-color-fill-main, fill opacity = 0.3]
     17 	(P0) -- (P1) -- (P5) -- (P4) -- cycle;
     18 
     19 \filldraw[very thick, draw=my-color-draw-main,
     20 	  fill=my-color-fill-main, fill opacity = 0.5]
     21 	(P0) -- (P2) -- (P6) -- (P4) -- cycle;
     22 
     23 
     24 \draw[very thick, draw=my-color-draw-main, dashed] (P7) -- (P6);
     25 \draw[very thick, draw=my-color-draw-main, dashed] (P7) -- (P5);
     26 \draw[very thick, draw=my-color-draw-main, dashed] (P7) -- (P3);
     27 
     28 
     29 \end{tikzpicture}
     30 \end{document}
     31