torus-triangulation.tex 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
  24. %horizontal
  25. \draw (bc1.center) -- (ad1.center);
  26. \draw (bc2.center) -- (ad2.center);
  27. \draw (bc3.center) -- (ad3.center);
  28. %vertical
  29. \draw (ab1.center) -- (cd3.center);
  30. \draw (ab2.center) -- (cd2.center);
  31. \draw (ab3.center) -- (cd1.center);
  32. %diagonal
  33. \draw (ad3.center) -- (cd3.center);
  34. \draw (ad2.center) -- (cd2.center);
  35. \draw (ad1.center) -- (cd1.center);
  36. \draw (a.center) -- (c.center);
  37. \draw (ab1.center) -- (bc3.center);
  38. \draw (ab2.center) -- (bc2.center);
  39. \draw (ab3.center) -- (bc1.center);
  40. \begin{scope}[decoration={
  41. markings,
  42. mark=at position 0.6 with {\arrow{>}}}
  43. ]
  44. \draw[postaction={decorate}] (a.center) -- (b.center);
  45. \draw[postaction={decorate}] (d.center) -- (c.center);
  46. \end{scope}
  47. \begin{scope}[decoration={
  48. markings,
  49. mark=at position 0.55 with {\arrow{>>}}}
  50. ]
  51. \draw[postaction={decorate}] (b.center) -- (c.center);
  52. \draw[postaction={decorate}] (a.center) -- (d.center);
  53. \end{scope}
  54. \end{tikzpicture}
  55. \end{document}