0

I am looking for a way to draw a figure like the following:

https://d2r55xnwy6nx47.cloudfront.net/uploads/2020/02/Ringels_Figs07.gif

Could you tell me if I can make something like that using LaTex

salam
  • 13
  • 1
  • Take a look at TikZ. – Rrjrjtlokrthjji Apr 27 '20 at 18:15
  • I have a solution for you for the shape and arrows. Regarding the animation, take a look here https://tex.stackexchange.com/questions/136666/exporting-animation-created-with-animate-package/136919#136919 – JeT Apr 27 '20 at 18:40
  • @salam do you validate the answers ? – JeT Apr 28 '20 at 21:45
  • @Julien-Elie Taieb, Yes, however, none of them was the exact one I wanted. In the picture I have sent the star is moving around the outer cycle. – salam May 02 '20 at 19:05
  • @salam schrodinger's cat answer addressed your question. With a minimum amount of work you can adapt the code. As you can fairly understand, you need to participate to your own answer. – JeT May 02 '20 at 19:44
  • 1
    @Julien-Elie Taieb, Thank you – salam May 02 '20 at 21:38

2 Answers2

3

Here is one of a zillion of ways.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\foreach \Iterator in {1,...,11}
{\begin{tikzpicture}
 \path foreach \X in {1,...,11}
  {(-2.25*360/11-\X*360/11:4) node[circle,inner sep=1ex,draw,thick,fill=gray] (c\X){}};
 \foreach \X in {11,...,\Iterator}  
 {\foreach \Y [evaluate=\Y as \Z using {int(Mod(\X+\Y-1,11)+1)}]in {2,4,...,10}
 {\ifnum\X=\Iterator
   \draw[blue!50,ultra thick] (c\X) -- (c\Z);
  \else
   \draw[gray!50,ultra thick] (c\X) -- (c\Z);
  \fi
 }}
\end{tikzpicture}}
\end{document}

enter image description here

2

Based on edges-only-on-the-outside you have more than a starting point.

enter image description here

For the dynamic graph, you'll need something like imagemagick.

Check exporting-animation-created-with-animate-package for the explanations.

\documentclass[tikz,export]{standalone}
\usepackage{animate}

\usepackage{pgfplots}
\usetikzlibrary{shapes.geometric}   


\def\numpoly{9}%number of nodes
\def\startangle{30}%direction of the first node
\def\pradious{33mm}

\begin{document}

\begin{tikzpicture}[
    every node/.style={draw=blue!60,shape=circle,fill=blue!60,text=white, minimum width={width("ee")+1pt}}]
    %------- calculations of the positions angles
    \pgfmathparse{int(\startangle+360/\numpoly)}%
    \let\nextangle=\pgfmathresult
    \pgfmathparse{int(\startangle-360/\numpoly+360)}%
    \let\endtangle=\pgfmathresult
    %--- nodes
    \foreach \i [count=\ii from 1] in {\startangle,\nextangle,...,\endtangle}
    \path (\i:\pradious) node (p\ii) {\ii};
    %--- interconnections
    \foreach \x in {1,...,\numpoly}
    \foreach \y in {\x,...,\numpoly}
    \draw[thin, gray] (p\y) -- (p\x);
\end{tikzpicture}

\end{document}
JeT
  • 3,020