\tikzset{
  bacillus/.style={draw,fill=white,shape=rounded rectangle,minimum width=2cm,
  minimum height=5mm,inner sep=0,anchor=center},
  backshape/.style={densely dotted},
  arrowz/.style={line cap=round,ultra thick,-Stealth,black!50},
  tumbler/.style={transform canvas={rotate around=38:(tumble.center)},
  shorten <=2pt}
}

\begin{frame}
  \frametitle{Moteur physique: spécification}
  \begin{columns}
    \column{.7\textwidth}\centering
    \begin{itemize}
      \item \structure{Dynamique individuelle}:

        \begin{center}
          \begin{tikzpicture}[node distance=7mm]
            \node (outrun) {
              \begin{tikzpicture}[rotate=90,baseline]
                \node[bacillus,backshape,rotate=90] (run) {};
                \node[bacillus,yshift=4mm,rotate=90] {};
                \draw[arrowz] (run.center) -- +(1cm,0);
              \end{tikzpicture}
            };
            \node[right=of outrun] (outumble) {
              \begin{tikzpicture}[rotate=90,baseline]
                \node[bacillus,backshape,rotate=90] (tumble) {};
                \node[bacillus,rotate around=128:(tumble.center)] {};
                \draw[arrowz,tumbler]
                (tumble.north east) to ($(tumble.north east) + (0,5mm)$);
                \draw[arrowz,tumbler]
                (tumble.south west) to ($(tumble.south west) + (0,-5mm)$);
              \end{tikzpicture}
            };
            \node[right=of outumble] (outgrow) {
              \begin{tikzpicture}[rotate=90,baseline]
                \node[bacillus,minimum width=2.2cm,minimum height=6mm,rotate=90] (grow) {};
                \node[bacillus,backshape,rotate=90,anchor=center] at (grow.center) {};
              \end{tikzpicture}
            };
            \node[right=of outgrow] (outdivide) {
              \begin{tikzpicture}[rotate=90,baseline]
                \node[bacillus,backshape,rotate=90] (divide) {};
                \node[bacillus,minimum width=1cm,anchor=west,rotate=90] at (divide.west) {};
                \node[bacillus,minimum width=1cm,anchor=east,rotate=90] at (divide.east) {};
              \end{tikzpicture}
            };
            \node[right=of outdivide] (outdie) {
              \begin{tikzpicture}[rotate=90,baseline]
                \node[bacillus,backshape,rotate=90] {};
              \end{tikzpicture}
            };

            \node[below=12mm of outrun.center]    {$R$};
            \node[below=12mm of outumble.center]  {$T$};
            \node[below=12mm of outgrow.center]   {$G$};
            \node[below=12mm of outdivide.center] {$D$};
            \node[below=12mm of outdie.center]    {$A$};
          \end{tikzpicture}
        \end{center}

        \medskip
      \item \structure{Dynamique collective}:
        \begin{itemize}
          \item \structure{Entrer} en collision avec ses voisines
          \item \structure{Inhiber} sa croissance (densité des bactéries)
        \end{itemize}
    \end{itemize}

    \column{.2\textwidth}\moteurs[transparent][structure!30]
  \end{columns}
\end{frame}

\begin{frame}{Moteur physique: modèle}
  \begin{columns}
    \column{.75\textwidth}\centering
    \begin{columns}
      \column{.6\textwidth}
      \begin{itemize}
        \item \structure{Bactérie virtuelle}
          \begin{itemize}
            \item Centre de masse, angle, \\longueur ($l$), rayon ($r$)
            \item Inertie ($I$), masse ($m$)
            \item Vitesse linéaire, vitesse angulaire, vitesse de croissance
            \item Âge de la membrane \\
              {\small\structure{[Stewart 2005]}}
          \end{itemize}
      \end{itemize}
      \column{.4\textwidth}
      \begin{center}
        \includegraphics[page=1,width=\textwidth]{vector/bacteria}
      \end{center}
    \end{columns}
    \begin{columns}
      \column{.4\textwidth}
      \begin{center}
        \includegraphics[page=3,width=\textwidth]{vector/collision-these}
      \end{center}
      \column{.6\textwidth}
      \begin{itemize}
        \item \structure{Collision}
          \begin{itemize}
            \item Conservation des moments
            \item Conservation des quantités de mouvement
            \item Théorie de l'impulsion
          \end{itemize}
          \medskip\footnotesize
          \begin{equation*}
            j = \displaystyle\frac{-(1 + Cr)\ \orr{v}_{ac12} \cdot{} \orr{n}} { 1/m_1 +
              1/m_2 + (\orr{r}_1 \wedge \orr{n})^2 / I_1 + (\orr{r}_2 \wedge \orr{n})^2
            / I_2}
          \end{equation*}
      \end{itemize}
    \end{columns}
    \column{.2\textwidth}\moteurs[transparent][structure!30]
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Moteur physique: réalisation}
  \begin{columns}
    \column{.7\textwidth}\centering
    \begin{itemize}
      \item \structure{Implémentation} sur automate cellulaire 2D du modèle agent
        \bigskip
      \item \structure{Utilisation de PPM}
        \begin{itemize}
          \item $N$ bactéries par cellule
          \item Traitement par bloc de $2 \times 2$
          \item Tri des bactéries « voyageuses »
        \end{itemize}
    \end{itemize}
    \begin{center}
      \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (img) at (0,0) {\includegraphics[width=5cm]{raster/ecoli-ca}};
        \draw                      (img.south west) grid (img.north east);
        \draw[very thick,step=2cm] (img.south west) grid (img.north east);
      \end{tikzpicture}
    \end{center}

    \column{.2\textwidth}\moteurs[transparent][structure!30]
  \end{columns}
\end{frame}
