torus-triangulation-minimal.tex 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 (ab2) at ($(a)!0.5!(b)$);
  12. \coordinate (ab1) at ($(a)!0.5!(ab2)$);
  13. \coordinate (ab3) at ($(b)!0.5!(ab2)$);
  14. \coordinate (bc2) at ($(b)!0.5!(c)$);
  15. \coordinate (bc1) at ($(b)!0.5!(bc2)$);
  16. \coordinate (bc3) at ($(c)!0.5!(bc2)$);
  17. \coordinate (cd2) at ($(c)!0.5!(d)$);
  18. \coordinate (cd1) at ($(c)!0.5!(cd2)$);
  19. \coordinate (cd3) at ($(d)!0.5!(cd2)$);
  20. \coordinate (ad2) at ($(a)!0.5!(d)$);
  21. \coordinate (ad1) at ($(a)!0.5!(ad2)$);
  22. \coordinate (ad3) at ($(d)!0.5!(ad2)$);
  23. \coordinate (corner1) at ($(a)!0.25!(bc3)$);
  24. \coordinate (corner2) at ($(c)!0.25!(ad1)$);
  25. \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
  26. %horizontal
  27. \draw (a.center) -- (bc3.center);
  28. \draw (cd3.center) -- (ad3.center);
  29. \draw (ab3.center) -- (bc1.center);
  30. \draw (cd3.center) -- (ad1.center);
  31. \draw (ab3.center) -- (bc3.center);
  32. \draw (ab1.center) -- (corner1.center);
  33. \draw (ad1.center) -- (corner1.center);
  34. \draw (ab3.center) -- (corner1.center);
  35. \draw (c.center) -- (corner2.center);
  36. \draw (cd1.center) -- (corner2.center);
  37. \draw (bc3.center) -- (corner2.center);
  38. \draw (cd3.center) -- (corner2.center);
  39. \draw (corner1.center) -- (corner2.center);
  40. \draw (ad1.center) -- (corner2.center);
  41. \begin{scope}[decoration={
  42. markings,
  43. mark=at position 0.6 with {\arrow{>}}}
  44. ]
  45. \draw[postaction={decorate}] (a.center) -- (b.center);
  46. \draw[postaction={decorate}] (d.center) -- (c.center);
  47. \end{scope}
  48. \begin{scope}[decoration={
  49. markings,
  50. mark=at position 0.55 with {\arrow{>>}}}
  51. ]
  52. \draw[postaction={decorate}] (b.center) -- (c.center);
  53. \draw[postaction={decorate}] (a.center) -- (d.center);
  54. \end{scope}
  55. \end{tikzpicture}
  56. \end{document}