\resizebox{\hsize}{!}{
\begin{picture}(140,65)(0,0)\nullfont

\newcommand\TT{{\cal T}}
\newcommand\rouge{red!60!white}
\newcommand\Rouge{red}
\newcommand\vvert{green!60!white}
\newcommand\VVert{green}
\newcommand\violet{red!70!blue!}
\newcommand\bleu{blue!60!white}
\newcommand\Bleu{blue}
\newcommand\invis{white}

%%partie gauche%%

   \node(A)(5,50){$q_0$}
   \node[fillcolor=\rouge](B)(20,50){$q$}
   \node[Nframe=n](C)(35,50){$$}

   \drawedge(A,B){$g$}

   \drawedge[linecolor=\violet](B,C){$$}


 \drawloop[loopdiam=5](B){$\TT_1$}
 \drawloop[loopdiam=5,loopangle=270](B){$\TT_2$}

\node[Nframe=n](C)(80,-30){truc}

%%partie droite%%

\only<2-5>{%
\node(R)(40,50){$q_0$}

  \node[fillcolor=\rouge](S)(70,50){$q_{12}$}
  \node[fillcolor=\rouge](T)(85,65){$q_1$}
  \node[fillcolor=\rouge](U)(85,35){$q_2$}
  \node[fillcolor=\rouge](V)(100,50){$q_4$}

\drawloop[loopdiam=5](S){$\TT_1$}
\drawloop[loopdiam=5,loopangle=270](S){$\TT_2$}
\drawloop[loopdiam=5](T){$\TT_1$}
\drawloop[loopdiam=5,loopangle=270](U){$\TT_2$}


%  \drawbpedge[ELside=r](R,230,70,V,-50,50){$g\wedge \neg g_1\wedge \neg g_2$}
}

\only<3-5>{%


  \node[Nframe=n](Sb)(85,50){$$}
  \node[Nframe=n](Tb)(100,65){$$}
  \node[Nframe=n](Ub)(100,35){$$}
  \node[Nframe=n](Vb)(115,50){$$}

 \drawedge[linecolor=\violet](U,Ub){$$}
 \drawedge[linecolor=\violet](V,Vb){$$}
 \drawedge[linecolor=\violet](S,Sb){$$}
 \drawedge[linecolor=\violet](T,Tb){$$}


  \drawedge(R,S){$g\wedge g_1\wedge g_2$}
  \drawedge[curvedepth=8](R,T){$g\wedge g_1 \wedge \neg g_2$}
  \drawedge[curvedepth=-8, ELside=r](R,U){$g\wedge \neg g_1\wedge g_2$}
%  \drawedge[curvedepth=-24,ELside=r](R,V){$g\wedge \neg g_1\wedge \neg g_2$}
  \drawbpedge[ELside=r](R,230,70,V,-50,50){$g\wedge \neg g_1\wedge \neg g_2$}
}


\only<4-5>{%
  \drawedge[linecolor=\bleu, curvedepth=2](S,T){$$}
  \drawedge[linecolor=\bleu, curvedepth=2](T,S){$$}
  \drawedge[linecolor=\bleu, curvedepth=2](U,T){$$}
  \drawedge[linecolor=\bleu, curvedepth=2](T,U){$$}
  \drawedge[linecolor=\bleu, curvedepth=2](S,U){$$}
  \drawedge[linecolor=\Bleu, curvedepth=2](U,S){$$}
}


\end{picture}
}