ueberlappung-kaestchen-torus.tex 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. % The following answers were used to create this image:
  2. % - http://tex.stackexchange.com/a/45824/5645 - Grid
  3. % - http://tex.stackexchange.com/a/373/5645 - Torus
  4. \documentclass[border=2pt]{standalone}
  5. \usepackage{amsmath,amssymb}
  6. \usepackage{tikz}
  7. \usetikzlibrary{patterns,arrows,positioning}
  8. \begin{document}
  9. \begin{tikzpicture}
  10. \tikzstyle{point}=[circle,thick,draw=black,fill=black,inner sep=0pt,minimum width=4pt,minimum height=4pt]
  11. \newcommand*{\xMin}{0}%
  12. \newcommand*{\xMax}{6}%
  13. \newcommand*{\yMin}{0}%
  14. \newcommand*{\yMax}{6}%
  15. \draw (-3.5,0) .. controls (-3.5,2) and (-1.5,2.5) .. (0,2.5);
  16. \draw[xscale=-1] (-3.5,0) .. controls (-3.5,2) and (-1.5,2.5) .. (0,2.5);
  17. \draw[rotate=180] (-3.5,0) .. controls (-3.5,2) and (-1.5,2.5) .. (0,2.5);
  18. \draw[yscale=-1] (-3.5,0) .. controls (-3.5,2) and (-1.5,2.5) .. (0,2.5);
  19. \draw (-2,.2) .. controls (-1.5,-0.3) and (-1,-0.5) .. (0,-.5) .. controls (1,-0.5) and (1.5,-0.3) .. (2,0.2);
  20. \draw (-1.75,0) .. controls (-1.5,0.3) and (-1,0.5) .. (0,.5) .. controls (1,0.5) and (1.5,0.3) .. (1.75,0);
  21. \begin{scope}[shift={(-12,-3)}]
  22. \foreach \i in {\xMin,...,\xMax} {
  23. \draw [very thin,gray] (\i,\yMin) -- (\i,\yMax) node [below] at (\i,\yMin) {$\i$};
  24. }
  25. \foreach \i in {\yMin,...,\yMax} {
  26. \draw [very thin,gray] (\xMin,\i) -- (\xMax,\i) node [left] at (\xMin,\i) {$\i$};
  27. }
  28. \begin{scope}[shift={(14,2)}]
  29. \node (P) at (0.4,0.9) {};
  30. \node (Q) at (0.9,0.4) {};
  31. \draw [red] (P) rectangle (Q);
  32. \draw (0.65, 0.6) node[red] {*};
  33. \end{scope}
  34. \foreach \x in {0,1,2,3,4,5} {
  35. \foreach \y in {0,1,2,3,4,5} {
  36. \begin{scope}[shift={(\x,\y)}]
  37. \node (P) at (0.4,0.9) {};
  38. \node (Q) at (0.9,0.4) {};
  39. \draw [red] (P) rectangle (Q);
  40. \draw (0.65, 0.6) node[red] {*};
  41. \end{scope}
  42. }
  43. }
  44. \end{scope}
  45. \draw (-4.5, 0) node[below] {$\xrightarrow{\text{\;\;\;\;\;\;\;\;}}$};
  46. \end{tikzpicture}
  47. \end{document}