Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{tikz}
  3. begin{document}
  4. begin{tikzpicture}
  5. def n {5}
  6. def radius {3cm}
  7. def margin {8} % margin in angles, depends on the radius
  8.  
  9. foreach s in {1,...,n}
  10. {
  11. node[draw, circle] at ({360/n * (s - 1)}:radius) {$s$};
  12. draw[->, >=latex] ({360/n * (s - 1)+margin}:radius)
  13. arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
  14. }
  15. end{tikzpicture}
  16. end{document}
  17.  
  18. documentclass{standalone}
  19. usepackage{tikz}
  20. begin{document}
  21. begin{tikzpicture}
  22. def n {5}
  23. def radius {3cm}
  24. def margin {12} % margin in angles, depends on the radius
  25.  
  26. foreach s in {1,...,n}
  27. {
  28. node[draw, circle] at ({360/n * (s - 1)}:radius) {$s-1$};
  29. draw[->, >=latex] ({360/n * (s - 1)+margin}:radius)
  30. arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
  31. }
  32. end{tikzpicture}
  33. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement