mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
25 lines
664 B
TeX
25 lines
664 B
TeX
|
% 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}
|
||
|
\node[vertex] (N-0) at (0:0) {};
|
||
|
\foreach \number in {1,...,\n}{
|
||
|
\node[vertex] (N-\number) at ({\number*(360/\n)}:5.4cm) {};
|
||
|
}
|
||
|
|
||
|
\draw (N-0) -- (N-1);
|
||
|
\draw (N-0) -- (N-2);
|
||
|
\draw (N-0) -- (N-3);
|
||
|
\draw (N-0) -- (N-4);
|
||
|
\draw (N-0) -- (N-5);
|
||
|
\end{tikzpicture}
|
||
|
\end{document}
|