MA0301/exam_template_graphics/graphics/directedGraph.tex

34 lines
1.1 KiB
TeX
Raw Normal View History

2021-05-17 18:39:28 +02:00
\newcommand{\arrow}[2]{\path [-{Latex[scale=1]}] (#1) edge (#2);}
\begin{tikzpicture}
\begin{scope}[every node/.style={shape=circle, fill=white, draw, inner sep=2pt}]
\node (A) at (0,4.0) {$A$};
\node (B) at (-2.82843,2.82843) {$B$};
\node (C) at (-4.0,0.0) {$C$};
\node (D) at (-2.82843,-2.82843) {$D$};
\node (E) at (-0.0,-4.0) {$E$};
\node (F) at (2.82843,-2.82843) {$F$};
\node (G) at (4.0,-0.0) {$G$};
\node (H) at (2.82843,2.82843) {$H$};
\end{scope}
\begin{scope}[every draw/.style={}]
\draw [-{Latex[scale=1]}] (A) to (B);
\draw [-{Latex[scale=1]}] (A) to (C);
\draw [-{Latex[scale=1]}] (C) to (D);
\draw [-{Latex[scale=1]}] (D) to (E);
\draw [-{Latex[scale=1]}, bend left=8] (H) to (A);
\draw [-{Latex[scale=1]}] (F) to (D);
\draw [-{Latex[scale=1]}] (C) to (B);
\draw [-{Latex[scale=1]}] (F) to (G);
\draw [-{Latex[scale=1]}] (D) to (E);
\draw [-{Latex[scale=1]}] (D) to (G);
\draw [-{Latex[scale=1]}, bend left=8] (A) to (H);
\draw [-{Latex[scale=1]}] (F) to (B);
\draw [-{Latex[scale=1]}, bend left=8] (H) to (C);
\draw [-{Latex[scale=1]}, bend left=8] (C) to (H);
\end{scope}
\end{tikzpicture}