torus-invalid-triangulation-2.tex 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. \coordinate (left-intersection) at ($(m)!0.5!(d)$);
  16. \coordinate (right-intersection) at ($(m)!0.5!(c)$);
  17. \draw[pattern=north west lines] (ad.center) -- (left-intersection.center) -- (m.center);
  18. \draw[pattern=dots] (m.center) -- (right-intersection.center) -- (bc.center);
  19. \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
  20. \draw (bc.center) -- (ad.center);
  21. \draw (cd.center) -- (ad.center);
  22. \draw (cd.center) -- (bc.center);
  23. \draw (ad.center) -- (ab.center);
  24. \draw (ab.center) -- (bc.center);
  25. \begin{scope}[decoration={
  26. markings,
  27. mark=at position 0.6 with {\arrow{>}}}
  28. ]
  29. \draw[postaction={decorate}] (a.center) -- (b.center);
  30. \draw[postaction={decorate}] (d.center) -- (c.center);
  31. \end{scope}
  32. \begin{scope}[decoration={
  33. markings,
  34. mark=at position 0.55 with {\arrow{>>}}}
  35. ]
  36. \draw[postaction={decorate}] (b.center) -- (c.center);
  37. \draw[postaction={decorate}] (a.center) -- (d.center);
  38. \end{scope}
  39. \draw (ab.center) -- (cd.center);
  40. \draw (a.center) -- (c.center);
  41. \draw (b.center) -- (d.center);
  42. \end{tikzpicture}
  43. \end{document}