Schéma explicatif de la transformation de Fourier rapide

Schéma explicatif de la FFT pour une suite de 2^3=8 valeurs, et donc de 3 étages

\documentclass[border=10pt]{standalone}
\usepackage{tikz,ifthen}
\newcounter{ym}
\newcounter{yp}
\newcounter{ai}
\newcounter{wi}
\definecolor{myblue}{RGB}{67,67,167}
\definecolor{myred}{RGB}{167,67,67}
\usetikzlibrary {arrows.meta}
\begin{document}
\tikzstyle{n}= [circle, fill, minimum size=4pt,inner sep=0pt, outer sep=0pt]
\tikzstyle{mul} = [circle,draw,inner sep=-1pt]
\begin{tikzpicture}[>=Latex,thick]
  \foreach \y in {0,...,7}
  \coordinate
  (N-0-\y) at (0,-\y);

  \node[left] at (N-0-0) {$a_0$};
  \node[left] at (N-0-1) {$a_4$};
  \node[left] at (N-0-2) {$a_2$};
  \node[left] at (N-0-3) {$a_6$};
  \node[left] at (N-0-4) {$a_1$};
  \node[left] at (N-0-5) {$a_5$};
  \node[left] at (N-0-6) {$a_3$};
  \node[left] at (N-0-7) {$a_7$};

  \foreach \y in {0,...,7}
  {
    \ifodd\y
    \node[draw,anchor=east]
    (N-1-\y) at (2,-\y) {$\omega_{2}^0$};
    \else
    \coordinate
    (N-1-\y) at (2,-\y);
    \fi
    \draw[{Circle[]}->] (N-0-\y.east)--(N-1-\y.west);
  }

  \foreach \y in {0,...,7}
  {
    \ifodd\y
    \node[mul]
    (N-2-\y) at (4,-\y) {$-$};
    \else
    \node[mul]
    (N-2-\y) at (4,-\y) {$+$};
    \fi
  }

  \foreach \y in {0,...,7}{
    \ifodd\y
    \draw[myblue,->] (N-1-\y)--(N-2-\y);
    \pgfmathparse{\y-1}
    \pgfmathsetcounter{ym}{\pgfmathresult}
    \draw[myblue,->] (N-1-\y.east)--(N-2-\theym.west);
    \else
    \draw[myred,->] (N-1-\y.east)--(N-2-\y.west);
    \pgfmathparse{\y+1}
    \pgfmathsetcounter{yp}{\pgfmathresult}
    \draw[myred,->] (N-1-\y.east)--(N-2-\theyp.west);
    \fi
  }

  \foreach \y in {0,...,7}
  {
    \pgfmathparse{int(mod(2*\y+1,8))}
    \pgfmathsetcounter{ai}{\pgfmathresult}
    \ifthenelse{\value{ai}>4}{
      \node[draw,anchor=east]
      (N-3-\y) at (6,-\y) {$\omega_4^{\thewi}$};
      \addtocounter{wi}{1}
    }{
      \setcounter{wi}{0}
      \coordinate
      (N-3-\y) at (6,-\y);
    }
    \draw[->] (N-2-\y.east)--(N-3-\y.west);
  }

  \foreach \y in {0,...,7}
  {
    \pgfmathparse{int(mod(2*\y+1,8))}
    \pgfmathsetcounter{ai}{\pgfmathresult}
    \ifthenelse{\value{ai}>4}{
      \node[mul]
      (N-4-\y) at (8,-\y) {$-$};
    }{
      \node[mul]
      (N-4-\y) at (8,-\y) {$+$};
    }
  }

  \foreach \y in {0,...,7}
  {
    \pgfmathparse{int(mod(2*\y+1,8))}
    \pgfmathsetcounter{ai}{\pgfmathresult}
    \ifthenelse{\value{ai}>4}{
      \node[mul]
      (N-4-\y) at (8,-\y) {$-$};
    }{
      \node[mul]
      (N-4-\y) at (8,-\y) {$+$};
    }
  }

  \foreach \y in {0,...,7}
  {
    \pgfmathparse{int(mod(2*\y+1,8))}
    \pgfmathsetcounter{ai}{\pgfmathresult}
    \ifthenelse{\value{ai}>4}{
      \pgfmathparse{\y-2}
      \pgfmathsetcounter{ym}{\pgfmathresult}
      \draw[myblue,->]
      (N-3-\y.east)--(N-4-\y.west);
      \draw[myblue,->]
      (N-3-\y.east)--(N-4-\theym.west);
    }{
      \pgfmathparse{\y+2}
      \pgfmathsetcounter{yp}{\pgfmathresult}
      \draw[myred,->]
      (N-3-\y.east)--(N-4-\y.west);
      \draw[myred,->]
      (N-3-\y.east)--(N-4-\theyp.west);
    }
  }

  \setcounter{wi}{0}
  \foreach \y in {0,...,7}
  {
    \ifthenelse{\y>3}{
      \node[draw,anchor=east]
      (N-5-\y) at (10,-\y) {$\omega_8^{\thewi}$};
      \addtocounter{wi}{1}
    }{
      \coordinate (N-5-\y) at (10,-\y);
    }
    \draw[->] (N-4-\y.east)--(N-5-\y.west);
  }

  \foreach \y in {0,...,7}
  {
    \ifthenelse{\y<4}{
      \node[mul]
      (N-6-\y) at (12,-\y) {$+$};
    }{
      \node[mul]
      (N-6-\y) at (12,-\y) {$-$};
    }
  }

  \foreach \y in {0,...,7}
  {
    \ifthenelse{\y<4}{
      \pgfmathparse{\y+4}
      \pgfmathsetcounter{yp}{\pgfmathresult}
      \draw[myred,->]
      (N-5-\y.east)--(N-6-\y.west);
      \draw[myred,->]
      (N-5-\y.east)--(N-6-\theyp.west);
    }
    {
      \pgfmathparse{\y-4}
      \pgfmathsetcounter{ym}{\pgfmathresult}
      \draw[myblue,->]
      (N-5-\y.east)--(N-6-\y.west);
      \draw[myblue,->]
      (N-5-\y.east)--(N-6-\theym.west);
    }
  }

  \foreach \y in {0,...,7}{
    \node[anchor=west]
    (N-7-\y) at (13,-\y) {$A_{\y}$};
    \draw[->] (N-6-\y.east)--(N-7-\y.west);
  }
\end{tikzpicture}

\end{document}