Example: A simple cycle

Published 2012-02-18 | Author: Jérôme Tremblay

Download as: [PDF] [TEX]  •  [Open in writeLaTeX]

A simple cycle

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

% A simple cycle
% Author : Jerome Tremblay

\def \n {5}
\def \radius {3cm}
\def \margin {8} % margin in angles, depends on the radius

\foreach \s in {1,...,\n}
  \node[draw, circle] at ({360/\n * (\s - 1)}:\radius) {$\s$};
  \draw[->, >=latex] ({360/\n * (\s - 1)+\margin}:\radius) 
    arc ({360/\n * (\s - 1)+\margin}:{360/\n * (\s)-\margin}:\radius);


Adding comments is currently not enabled.