2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/torus-invalid-triangulation-1/torus-invalid-triangulation-1.tex
Martin Thoma 7740f0147f Remove trailing spaces
The commands

find . -type f -name '*.md' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

and

find . -type f -name '*.tex' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

were used to do so.
2015-10-14 14:25:34 +02:00

42 lines
1.5 KiB
TeX

\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}