\documentclass{article}
\usepackage{animate}
\usepackage{tikz}
\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\usetikzlibrary{lindenmayersystems}
\usepackage[paperheight=20.2cm,paperwidth=16.2cm,bottom=-1cm,top=-1cm,left=-1.8cm,right=0cm]{geometry}
\begin{document}
\begin{tikzpicture}
\foreach \x in {31,91,...,391}{%
\draw (\x:3cm) circle (5pt)[fill=black];
\draw (\x:5cm) circle (5pt)[fill=black];
\draw (\x:3cm) [line width=1pt]-- (\x+60:3cm);
\draw (\x:3cm) [line width=1pt]-- (\x+120:3cm);
\draw (\x:3cm) [line width=1pt]-- (\x+180:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x-60:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x+60:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x-120:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x+120:3cm);
\draw (\x:5cm)[line width=1pt]..controls(\x+120:11cm)..(\x+180:3cm);
%\draw (\x:3cm) [line width=3pt] -- (\x+144:3cm);
%\draw (\x:3cm) [line width=3pt] -- (\x:3cm);}
\draw(31:3cm)node[right=2pt]{\huge $v_6$};
\draw(91:3cm)node[above=2pt]{\huge $v_1$};
\draw(151:3cm)node[left=2pt]{\huge $v_2$};
\draw(211:3cm)node[left=2pt]{\huge $v_3$};
\draw(271:3cm)node[below=2pt]{\huge $v_4$};
\draw(331:3cm)node[right=2pt]{\huge $v_5$};
\draw(271:5cm)node[below=3.5cm]{\huge $S'(K_6)$};
\draw(31:5cm)node[right=2pt]{\huge $v_6'$};
\draw(91:5cm)node[above=2pt]{\huge $v_1'$};
\draw(151:5cm)node[left=2pt]{\huge $v_2'$};
\draw(211:5cm)node[left=2pt]{\huge $v_3'$};
\draw(271:5cm)node[below=2pt]{\huge $v_4'$};
\draw(331:5cm)node[right=2pt]{\huge $v_5'$};
\end{tikzpicture}
\end{document}
Ich zeichne das obige Diagramm, in dem sich die inneren Beschriftungen mit den Kanten überlappen. Wenn jemand mit Überlappung zeichnen könnte oder wenn jemand dasselbe Diagramm auf eine andere Weise zeichnen könnte, wäre das auch hilfreich für mich.
Antwort1
Erstens liegt in Ihrem Code ein Fehler vor: Sie haben die Klammer auskommentiert, die den Hauptteil der foreach
Schleife beendet.
Zu Deinem Layoutproblem: Verwende es controls
mit zwei Punkten.
\draw (A) .. controls (a) and (b) .. (B);
Die Linie verlässt die Linie (A)
in Richtung (a)
und kommt (B)
aus der Richtung an (b)
.
Erwägen Sie in Ihrer Anwendung den Ersatz
\draw (\x:5cm)[line width=1pt]..controls(\x+120:11cm)..(\x+180:3cm);
von
\draw (\x:5cm)[line width=1pt]..controls(\x+100:10cm) and (\x+120:11cm)..(\x+180:3cm);
\documentclass{article}
\usepackage{animate}
\usepackage{tikz}
\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\usetikzlibrary{lindenmayersystems}
\usepackage[paperheight=20.2cm,paperwidth=16.2cm,bottom=-1cm,top=-1cm,left=-1.8cm,right=0cm]{geometry}
\begin{document}
\begin{tikzpicture}
\foreach \x in {31,91,...,391}{%
\draw (\x:3cm) circle (5pt)[fill=black];
\draw (\x:5cm) circle (5pt)[fill=black];
\draw (\x:3cm) [line width=1pt]-- (\x+60:3cm);
\draw (\x:3cm) [line width=1pt]-- (\x+120:3cm);
\draw (\x:3cm) [line width=1pt]-- (\x+180:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x-60:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x+60:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x-120:3cm);
\draw (\x:5cm) [line width=1pt]-- (\x+120:3cm);
%\draw (\x:5cm)[line width=1pt]..controls(\x+120:11cm)..(\x+180:3cm);
\draw (\x:5cm)[line width=1pt]..controls(\x+100:10cm) and (\x+120:11cm)..(\x+180:3cm);
%\draw (\x:3cm) [line width=3pt] -- (\x+144:3cm);
%\draw (\x:3cm) [line width=3pt] -- (\x:3cm);
}
\draw(31:3cm)node[right=2pt]{\huge $v_6$};
\draw(91:3cm)node[above=2pt]{\huge $v_1$};
\draw(151:3cm)node[left=2pt]{\huge $v_2$};
\draw(211:3cm)node[left=2pt]{\huge $v_3$};
\draw(271:3cm)node[below=2pt]{\huge $v_4$};
\draw(331:3cm)node[right=2pt]{\huge $v_5$};
\draw(271:5cm)node[below=3.5cm]{\huge $S'(K_6)$};
\draw(31:5cm)node[right=2pt]{\huge $v_6'$};
\draw(91:5cm)node[above=2pt]{\huge $v_1'$};
\draw(151:5cm)node[left=2pt]{\huge $v_2'$};
\draw(211:5cm)node[left=2pt]{\huge $v_3'$};
\draw(271:5cm)node[below=2pt]{\huge $v_4'$};
\draw(331:5cm)node[right=2pt]{\huge $v_5'$};
\end{tikzpicture}
\end{document}