Procházet zdrojové kódy

Triangulierung des Torus

Martin Thoma před 11 roky
rodič
revize
84416324f5
24 změnil soubory, kde provedl 548 přidání a 0 odebrání
  1. binární
      documents/GeoTopo/GeoTopo.pdf
  2. 34 0
      documents/GeoTopo/Kapitel2.tex
  3. binární
      documents/GeoTopo/definitions/definitionen.pdf
  4. 32 0
      documents/GeoTopo/figures/torus-invalid-triangulation-1.tex
  5. 39 0
      documents/GeoTopo/figures/torus-invalid-triangulation-2.tex
  6. 53 0
      documents/GeoTopo/figures/torus-triangulation-minimal.tex
  7. 51 0
      documents/GeoTopo/figures/torus-triangulation.tex
  8. binární
      documents/GeoTopo/other-formats/GeoTopo-A5.pdf
  9. 31 0
      tikz/torus-invalid-triangulation-1/Makefile
  10. 3 0
      tikz/torus-invalid-triangulation-1/Readme.md
  11. binární
      tikz/torus-invalid-triangulation-1/torus-invalid-triangulation-1.png
  12. 42 0
      tikz/torus-invalid-triangulation-1/torus-invalid-triangulation-1.tex
  13. 31 0
      tikz/torus-invalid-triangulation-2/Makefile
  14. 3 0
      tikz/torus-invalid-triangulation-2/Readme.md
  15. binární
      tikz/torus-invalid-triangulation-2/torus-invalid-triangulation-2.png
  16. 45 0
      tikz/torus-invalid-triangulation-2/torus-invalid-triangulation-2.tex
  17. 31 0
      tikz/torus-triangulation-minimal/Makefile
  18. 3 0
      tikz/torus-triangulation-minimal/Readme.md
  19. binární
      tikz/torus-triangulation-minimal/torus-triangulation-minimal.png
  20. 59 0
      tikz/torus-triangulation-minimal/torus-triangulation-minimal.tex
  21. 31 0
      tikz/torus-triangulation/Makefile
  22. 3 0
      tikz/torus-triangulation/Readme.md
  23. binární
      tikz/torus-triangulation/torus-triangulation.png
  24. 57 0
      tikz/torus-triangulation/torus-triangulation.tex

binární
documents/GeoTopo/GeoTopo.pdf


+ 34 - 0
documents/GeoTopo/Kapitel2.tex

@@ -871,6 +871,40 @@ Differenzierbare Mannigfaltigkeiten der Klasse $C^\infty$ werden auch
     Dann heißt $h$ eine \textbf{Triangulierung} von $X$.
 \end{definition}
 
+\begin{beispiel}[Triangulierung des Torus]\xindex{Torus}%
+    Für eine Triangulierung des Torus werden mindestens 14 Dreiecke benötigt.
+    Beispiele für fehlerhafte \enquote{Triangulierungen} sind in \cref{fig:torus-triangulierung-fails}
+    zu sehen. Korrekte Triangulierungen sind in \cref{fig:torus-triangulierung}.
+
+    \begin{figure}[htp]
+    \centering
+      \subfloat[Die beiden markierten Dreiecke schneiden sich im Mittelpunkt und in einer Seite.]{
+          \resizebox{0.45\linewidth}{!}{\input{figures/torus-invalid-triangulation-1.tex}}
+          \label{fig:torus-triangulierung-fail-1}
+      }%
+      \subfloat[Die beiden markierten Dreiecke schneiden sich im Mittelpunkt und außen.]{
+          \resizebox{0.45\linewidth}{!}{\input{figures/torus-invalid-triangulation-2.tex}}
+          \label{fig:torus-triangulierung-fail-2}
+      }%
+    \label{fig:torus-triangulierung-fails}
+    \caption{Fehlerhafte Triangulierungen}
+    \end{figure}
+
+    \begin{figure}[htp]
+    \centering
+      \subfloat[Einfache Triangulierung]{
+          \resizebox{0.45\linewidth}{!}{\input{figures/torus-triangulation.tex}}
+          \label{fig:torus-triangulierung-simple}
+      }%
+      \subfloat[Minimale Triangulierung]{
+          \resizebox{0.45\linewidth}{!}{\input{figures/torus-triangulation-minimal.tex}}
+          \label{fig:torus-triangulierung-minimal}
+      }%
+    \label{fig:torus-triangulierung}
+    \caption{Triangulierungen des Torus}
+    \end{figure}
+\end{beispiel}
+
 \begin{satz}[Eulersche Polyederformel]\xindex{Eulersche Polyederformel}%
     Sei $P$ ein konvexes Polyeder in $\mdr^3$, d.~h. $\partial P$ ist
     ein 2-dimensionaler Simplizialkomplex, sodass gilt:

binární
documents/GeoTopo/definitions/definitionen.pdf


+ 32 - 0
documents/GeoTopo/figures/torus-invalid-triangulation-1.tex

@@ -0,0 +1,32 @@
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab) at ($(a)!0.5!(b)$);
+    \coordinate (bc) at ($(b)!0.5!(c)$);
+    \coordinate (cd) at ($(c)!0.5!(d)$);
+    \coordinate (ad) at ($(a)!0.5!(d)$);
+    \draw[pattern=north west lines] (d.center) -- (ad.center) -- (m.center);
+    \draw[pattern=dots] (m.center) -- (bc.center) -- (c.center);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+    \draw (ab.center) -- (cd.center);
+    \draw (a.center) -- (c.center);
+    \draw (b.center) -- (d.center);
+\end{tikzpicture}

+ 39 - 0
documents/GeoTopo/figures/torus-invalid-triangulation-2.tex

@@ -0,0 +1,39 @@
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab) at ($(a)!0.5!(b)$);
+    \coordinate (bc) at ($(b)!0.5!(c)$);
+    \coordinate (cd) at ($(c)!0.5!(d)$);
+    \coordinate (ad) at ($(a)!0.5!(d)$);
+    \coordinate (left-intersection) at ($(m)!0.5!(d)$);
+    \coordinate (right-intersection) at ($(m)!0.5!(c)$);
+    \draw[pattern=north west lines] (ad.center) -- (left-intersection.center) -- (m.center);
+    \draw[pattern=dots] (m.center) -- (right-intersection.center) -- (bc.center);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    \draw (bc.center) -- (ad.center);
+    \draw (cd.center) -- (ad.center);
+    \draw (cd.center) -- (bc.center);
+    \draw (ad.center) -- (ab.center);
+    \draw (ab.center) -- (bc.center);
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+    \draw (ab.center) -- (cd.center);
+    \draw (a.center) -- (c.center);
+    \draw (b.center) -- (d.center);
+\end{tikzpicture}

+ 53 - 0
documents/GeoTopo/figures/torus-triangulation-minimal.tex

@@ -0,0 +1,53 @@
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab2) at ($(a)!0.5!(b)$);
+    \coordinate (ab1) at ($(a)!0.5!(ab2)$);
+    \coordinate (ab3) at ($(b)!0.5!(ab2)$);
+    \coordinate (bc2) at ($(b)!0.5!(c)$);
+    \coordinate (bc1) at ($(b)!0.5!(bc2)$);
+    \coordinate (bc3) at ($(c)!0.5!(bc2)$);
+    \coordinate (cd2) at ($(c)!0.5!(d)$);
+    \coordinate (cd1) at ($(c)!0.5!(cd2)$);
+    \coordinate (cd3) at ($(d)!0.5!(cd2)$);
+    \coordinate (ad2) at ($(a)!0.5!(d)$);
+    \coordinate (ad1) at ($(a)!0.5!(ad2)$);
+    \coordinate (ad3) at ($(d)!0.5!(ad2)$);
+    \coordinate (corner1) at ($(a)!0.25!(bc3)$);
+    \coordinate (corner2) at ($(c)!0.25!(ad1)$);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    %horizontal
+    \draw (a.center) -- (bc3.center);
+    \draw (cd3.center) -- (ad3.center);
+    \draw (ab3.center) -- (bc1.center);
+    \draw (cd3.center) -- (ad1.center);
+    \draw (ab3.center) -- (bc3.center);
+    \draw (ab1.center) -- (corner1.center);
+    \draw (ad1.center) -- (corner1.center);
+    \draw (ab3.center) -- (corner1.center);
+    \draw (c.center) -- (corner2.center);
+    \draw (cd1.center) -- (corner2.center);
+    \draw (bc3.center) -- (corner2.center);
+    \draw (cd3.center) -- (corner2.center);
+    \draw (corner1.center) -- (corner2.center);
+    \draw (ad1.center) -- (corner2.center);
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+\end{tikzpicture}

+ 51 - 0
documents/GeoTopo/figures/torus-triangulation.tex

@@ -0,0 +1,51 @@
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab2) at ($(a)!0.5!(b)$);
+    \coordinate (ab1) at ($(a)!0.5!(ab2)$);
+    \coordinate (ab3) at ($(b)!0.5!(ab2)$);
+    \coordinate (bc2) at ($(b)!0.5!(c)$);
+    \coordinate (bc1) at ($(b)!0.5!(bc2)$);
+    \coordinate (bc3) at ($(c)!0.5!(bc2)$);
+    \coordinate (cd2) at ($(c)!0.5!(d)$);
+    \coordinate (cd1) at ($(c)!0.5!(cd2)$);
+    \coordinate (cd3) at ($(d)!0.5!(cd2)$);
+    \coordinate (ad2) at ($(a)!0.5!(d)$);
+    \coordinate (ad1) at ($(a)!0.5!(ad2)$);
+    \coordinate (ad3) at ($(d)!0.5!(ad2)$);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    %horizontal
+    \draw (bc1.center) -- (ad1.center);
+    \draw (bc2.center) -- (ad2.center);
+    \draw (bc3.center) -- (ad3.center);
+    %vertical
+    \draw (ab1.center) -- (cd3.center);
+    \draw (ab2.center) -- (cd2.center);
+    \draw (ab3.center) -- (cd1.center);
+    %diagonal
+    \draw (ad3.center) -- (cd3.center);
+    \draw (ad2.center) -- (cd2.center);
+    \draw (ad1.center) -- (cd1.center);
+    \draw (a.center)   -- (c.center);
+    \draw (ab1.center) -- (bc3.center);
+    \draw (ab2.center) -- (bc2.center);
+    \draw (ab3.center) -- (bc1.center);
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+\end{tikzpicture}

binární
documents/GeoTopo/other-formats/GeoTopo-A5.pdf


+ 31 - 0
tikz/torus-invalid-triangulation-1/Makefile

@@ -0,0 +1,31 @@
+SOURCE = torus-invalid-triangulation-1
+DELAY = 80
+DENSITY = 300
+WIDTH = 512
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
+transparentGif:
+	convert $(SOURCE).pdf -transparent white result.gif
+	make clean
+
+svg:
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	pdf2svg $(SOURCE).pdf $(SOURCE).svg
+	# Necessary, as pdf2svg does not always create valid svgs:
+	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

+ 3 - 0
tikz/torus-invalid-triangulation-1/Readme.md

@@ -0,0 +1,3 @@
+Compiled example
+----------------
+![Example](torus-invalid-triangulation-1.png)

binární
tikz/torus-invalid-triangulation-1/torus-invalid-triangulation-1.png


+ 42 - 0
tikz/torus-invalid-triangulation-1/torus-invalid-triangulation-1.tex

@@ -0,0 +1,42 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns,calc,decorations.markings}
+
+\begin{document}
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab) at ($(a)!0.5!(b)$);
+    \coordinate (bc) at ($(b)!0.5!(c)$);
+    \coordinate (cd) at ($(c)!0.5!(d)$);
+    \coordinate (ad) at ($(a)!0.5!(d)$);
+    \draw[pattern=north west lines] (d.center) -- (ad.center) -- (m.center);
+    \draw[pattern=dots] (m.center) -- (bc.center) -- (c.center);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+    \draw (ab.center) -- (cd.center);
+    \draw (a.center) -- (c.center);
+    \draw (b.center) -- (d.center);
+
+    %\draw[pattern=north west lines] (a.center) -- (b.center) -- (z.center) --cycle;
+    %\draw[pattern=dots] (b.center) -- (c.center) -- (z.center) --cycle;
+    %\draw[pattern=crosshatch] (a.center) -- (c.center) -- (z.center) --cycle;
+\end{tikzpicture}
+\end{document}

+ 31 - 0
tikz/torus-invalid-triangulation-2/Makefile

@@ -0,0 +1,31 @@
+SOURCE = torus-invalid-triangulation-2
+DELAY = 80
+DENSITY = 300
+WIDTH = 512
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
+transparentGif:
+	convert $(SOURCE).pdf -transparent white result.gif
+	make clean
+
+svg:
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	pdf2svg $(SOURCE).pdf $(SOURCE).svg
+	# Necessary, as pdf2svg does not always create valid svgs:
+	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

+ 3 - 0
tikz/torus-invalid-triangulation-2/Readme.md

@@ -0,0 +1,3 @@
+Compiled example
+----------------
+![Example](torus-invalid-triangulation-2.png)

binární
tikz/torus-invalid-triangulation-2/torus-invalid-triangulation-2.png


+ 45 - 0
tikz/torus-invalid-triangulation-2/torus-invalid-triangulation-2.tex

@@ -0,0 +1,45 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns,calc,decorations.markings}
+
+\begin{document}
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab) at ($(a)!0.5!(b)$);
+    \coordinate (bc) at ($(b)!0.5!(c)$);
+    \coordinate (cd) at ($(c)!0.5!(d)$);
+    \coordinate (ad) at ($(a)!0.5!(d)$);
+    \coordinate (left-intersection) at ($(m)!0.5!(d)$);
+    \coordinate (right-intersection) at ($(m)!0.5!(c)$);
+    \draw[pattern=north west lines] (ad.center) -- (left-intersection.center) -- (m.center);
+    \draw[pattern=dots] (m.center) -- (right-intersection.center) -- (bc.center);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    \draw (bc.center) -- (ad.center);
+    \draw (cd.center) -- (ad.center);
+    \draw (cd.center) -- (bc.center);
+    \draw (ad.center) -- (ab.center);
+    \draw (ab.center) -- (bc.center);
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+    \draw (ab.center) -- (cd.center);
+    \draw (a.center) -- (c.center);
+    \draw (b.center) -- (d.center);
+\end{tikzpicture}
+\end{document}

+ 31 - 0
tikz/torus-triangulation-minimal/Makefile

@@ -0,0 +1,31 @@
+SOURCE = torus-triangulation-minimal
+DELAY = 80
+DENSITY = 300
+WIDTH = 512
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
+transparentGif:
+	convert $(SOURCE).pdf -transparent white result.gif
+	make clean
+
+svg:
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	pdf2svg $(SOURCE).pdf $(SOURCE).svg
+	# Necessary, as pdf2svg does not always create valid svgs:
+	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

+ 3 - 0
tikz/torus-triangulation-minimal/Readme.md

@@ -0,0 +1,3 @@
+Compiled example
+----------------
+![Example](torus-triangulation-minimal.png)

binární
tikz/torus-triangulation-minimal/torus-triangulation-minimal.png


+ 59 - 0
tikz/torus-triangulation-minimal/torus-triangulation-minimal.tex

@@ -0,0 +1,59 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns,calc,decorations.markings}
+
+\begin{document}
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab2) at ($(a)!0.5!(b)$);
+    \coordinate (ab1) at ($(a)!0.5!(ab2)$);
+    \coordinate (ab3) at ($(b)!0.5!(ab2)$);
+    \coordinate (bc2) at ($(b)!0.5!(c)$);
+    \coordinate (bc1) at ($(b)!0.5!(bc2)$);
+    \coordinate (bc3) at ($(c)!0.5!(bc2)$);
+    \coordinate (cd2) at ($(c)!0.5!(d)$);
+    \coordinate (cd1) at ($(c)!0.5!(cd2)$);
+    \coordinate (cd3) at ($(d)!0.5!(cd2)$);
+    \coordinate (ad2) at ($(a)!0.5!(d)$);
+    \coordinate (ad1) at ($(a)!0.5!(ad2)$);
+    \coordinate (ad3) at ($(d)!0.5!(ad2)$);
+    \coordinate (corner1) at ($(a)!0.25!(bc3)$);
+    \coordinate (corner2) at ($(c)!0.25!(ad1)$);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    %horizontal
+    \draw (a.center) -- (bc3.center);
+    \draw (cd3.center) -- (ad3.center);
+    \draw (ab3.center) -- (bc1.center);
+    \draw (cd3.center) -- (ad1.center);
+    \draw (ab3.center) -- (bc3.center);
+    \draw (ab1.center) -- (corner1.center);
+    \draw (ad1.center) -- (corner1.center);
+    \draw (ab3.center) -- (corner1.center);
+    \draw (c.center) -- (corner2.center);
+    \draw (cd1.center) -- (corner2.center);
+    \draw (bc3.center) -- (corner2.center);
+    \draw (cd3.center) -- (corner2.center);
+    \draw (corner1.center) -- (corner2.center);
+    \draw (ad1.center) -- (corner2.center);
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+\end{tikzpicture}
+\end{document}

+ 31 - 0
tikz/torus-triangulation/Makefile

@@ -0,0 +1,31 @@
+SOURCE = torus-triangulation
+DELAY = 80
+DENSITY = 300
+WIDTH = 512
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
+transparentGif:
+	convert $(SOURCE).pdf -transparent white result.gif
+	make clean
+
+svg:
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	pdf2svg $(SOURCE).pdf $(SOURCE).svg
+	# Necessary, as pdf2svg does not always create valid svgs:
+	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

+ 3 - 0
tikz/torus-triangulation/Readme.md

@@ -0,0 +1,3 @@
+Compiled example
+----------------
+![Example](torus-triangulation.png)

binární
tikz/torus-triangulation/torus-triangulation.png


+ 57 - 0
tikz/torus-triangulation/torus-triangulation.tex

@@ -0,0 +1,57 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns,calc,decorations.markings}
+
+\begin{document}
+\begin{tikzpicture}
+    \node (a) at (0,0) {};
+    \node (b) at (1,0) {};
+    \node (c) at (1,1) {};
+    \node (d) at (0,1) {};
+    \coordinate (m) at ($(a)!0.5!(c)$);
+    \coordinate (ab2) at ($(a)!0.5!(b)$);
+    \coordinate (ab1) at ($(a)!0.5!(ab2)$);
+    \coordinate (ab3) at ($(b)!0.5!(ab2)$);
+    \coordinate (bc2) at ($(b)!0.5!(c)$);
+    \coordinate (bc1) at ($(b)!0.5!(bc2)$);
+    \coordinate (bc3) at ($(c)!0.5!(bc2)$);
+    \coordinate (cd2) at ($(c)!0.5!(d)$);
+    \coordinate (cd1) at ($(c)!0.5!(cd2)$);
+    \coordinate (cd3) at ($(d)!0.5!(cd2)$);
+    \coordinate (ad2) at ($(a)!0.5!(d)$);
+    \coordinate (ad1) at ($(a)!0.5!(ad2)$);
+    \coordinate (ad3) at ($(d)!0.5!(ad2)$);
+    \draw (a.center) -- (b.center) -- (c.center) -- (d.center) -- cycle;
+    %horizontal
+    \draw (bc1.center) -- (ad1.center);
+    \draw (bc2.center) -- (ad2.center);
+    \draw (bc3.center) -- (ad3.center);
+    %vertical
+    \draw (ab1.center) -- (cd3.center);
+    \draw (ab2.center) -- (cd2.center);
+    \draw (ab3.center) -- (cd1.center);
+    %diagonal
+    \draw (ad3.center) -- (cd3.center);
+    \draw (ad2.center) -- (cd2.center);
+    \draw (ad1.center) -- (cd1.center);
+    \draw (a.center)   -- (c.center);
+    \draw (ab1.center) -- (bc3.center);
+    \draw (ab2.center) -- (bc2.center);
+    \draw (ab3.center) -- (bc1.center);
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.6 with {\arrow{>}}}
+    ] 
+        \draw[postaction={decorate}] (a.center) -- (b.center);
+        \draw[postaction={decorate}] (d.center) -- (c.center);
+    \end{scope}
+
+    \begin{scope}[decoration={
+        markings,
+        mark=at position 0.55 with {\arrow{>>}}}
+    ] 
+        \draw[postaction={decorate}] (b.center) -- (c.center);
+        \draw[postaction={decorate}] (a.center) -- (d.center);
+    \end{scope}
+\end{tikzpicture}
+\end{document}