torus-invalid-triangulation-1.tex 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{patterns,calc,decorations.markings}
  4. \begin{document}
  5. \begin{tikzpicture}
  6. \node (a) at (0,0) {};
  7. \node (b) at (1,0) {};
  8. \node (c) at (1,1) {};
  9. \node (d) at (0,1) {};
  10. \coordinate (m) at ($(a)!0.5!(c)$);
  11. \coordinate (ab) at ($(a)!0.5!(b)$);
  12. \coordinate (bc) at ($(b)!0.5!(c)$);
  13. \coordinate (cd) at ($(c)!0.5!(d)$);
  14. \coordinate (ad) at ($(a)!0.5!(d)$);
  15. \draw[pattern=north west lines] (d.center) -- (ad.center) -- (m.center);
  16. \draw[pattern=dots] (m.center) -- (bc.center) -- (c.center);
  17. \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
  18. \begin{scope}[decoration={
  19. markings,
  20. mark=at position 0.6 with {\arrow{>}}}
  21. ]
  22. \draw[postaction={decorate}] (a.center) -- (b.center);
  23. \draw[postaction={decorate}] (d.center) -- (c.center);
  24. \end{scope}
  25. \begin{scope}[decoration={
  26. markings,
  27. mark=at position 0.55 with {\arrow{>>}}}
  28. ]
  29. \draw[postaction={decorate}] (b.center) -- (c.center);
  30. \draw[postaction={decorate}] (a.center) -- (d.center);
  31. \end{scope}
  32. \draw (ab.center) -- (cd.center);
  33. \draw (a.center) -- (c.center);
  34. \draw (b.center) -- (d.center);
  35. %\draw[pattern=north west lines] (a.center) -- (b.center) -- (z.center) --cycle;
  36. %\draw[pattern=dots] (b.center) -- (c.center) -- (z.center) --cycle;
  37. %\draw[pattern=crosshatch] (a.center) -- (c.center) -- (z.center) --cycle;
  38. \end{tikzpicture}
  39. \end{document}