12345678910111213141516171819202122232425 |
- % A complete graph
- % Author: Quintin Jean-Noël
- % <http://moais.imag.fr/membres/jean-noel.quintin/>
- \documentclass[varwidth=true, border=2pt]{standalone}
- \usepackage[nomessages]{fp}% http://ctan.org/pkg/fp
- \usepackage{tikz}
- \usetikzlibrary[topaths]
- \begin{document}
- \newcommand\n{5}
- \begin{tikzpicture}
- %the multiplication with floats is not possible. Thus I split the loop in two.
- \foreach \number in {1,...,\n}{
- \node[vertex] (N-\number) at ({\number*(360/\n)}:5.4cm) {};
- }
- \draw (N-1) -- (N-2);
- \draw (N-2) -- (N-3);
- \draw (N-3) -- (N-4);
- \draw (N-4) -- (N-5);
- \draw (N-5) -- (N-1);
- \end{tikzpicture}
- \end{document}
|