顶点动画不正确

顶点动画不正确

我在顶点中看到不正确的动画。请指导我。谢谢

 \documentclass{article}
 \usepackage[a4paper]{geometry}
\usepackage{tikz}
\usepackage{animate}
\newcommand\vertices[1]{%
\draw(0,0) [fill=black] circle (#1);
\draw(2,0) [fill=black] circle (#1);
\draw(4,0) [fill=black] circle (#1);
\draw(6,0) [fill=black] circle (#1);
\draw(8,0) [fill=black] circle (#1);
\draw(10,0) [fill=black] circle (#1);
\draw(12,0) [fill=black] circle (#1);}
\newcommand\dsvertices[1]{%
\draw(6,3) [fill=black] circle (#1);
\draw(6,-3) [fill=black] circle (#1);}
\newcommand\edges[1]{%
\draw[draw=red,line width=1pt] (0,0)--(0+12*#1,0);}
\newcommand\udsedges[1]{%
\draw[draw=red,line width=1pt] (2,0)--(2+4*#1,0+3*#1);
\draw[draw=red,line width=1pt] (4,0)--(4+2*#1,0+3*#1);
\draw[draw=red,line width=1pt] (6,0)--(6+0*#1,0+3*#1);
\draw[draw=red,line width=1pt] (8,0)--(8-2*#1,0+3*#1);
\draw[draw=red,line width=1pt] (10,0)--(10-4*#1,0+3*#1);}
\newcommand\ldsedges[1]{%
\draw[draw=red,line width=1pt] (0,0)--(0+6*#1,0-3*#1);
\draw[draw=red,line width=1pt] (12,0)--(12-6*#1,0-3*#1);}
\begin{document}
\begin{animateinline}[autoplay]{40}
\multiframe{51}{d=0pt+0.06pt}{ %d=0pt,0.03pt,...,3pt
\begin{tikzpicture}
\draw(6,-3)node[below=7mm]{$\gamma_{re}DS(P_7)$};
\vertices{\d}
\end{tikzpicture}}
\newframe*    %insert pause, click to continue
\multiframe{200}{n=0+0.005}{    %n=0,0.01,...,1.0
\begin{tikzpicture}
\draw(6,-3)node[below=7mm]{$\gamma_{re}DS(P_7)$};
\edges{\n}
\vertices{3pt}
\end{tikzpicture}}
 \newframe*
\multiframe{51}{d=0pt+0.06pt}{ %d=0pt,0.03pt,...,3pt
\begin{tikzpicture}
\draw(6,-3)node[below=3cm]{$\gamma_{re}DS(P_7)$};
 \vertices{3pt}
 \edges{1}
 \dsvertices{\d}
\end{tikzpicture}}
\newframe*    %insert pause, click to continue
\multiframe{250}{n=0+0.004}{    %n=0,0.01,...,1.0
\begin{tikzpicture}
\draw(6,-3)node[below=7mm]{$\gamma_{re}DS(P_7)$};
 \edges{1}
 \vertices{3pt}
 \dsvertices{3pt}
 \udsedges{\n}
 \end{tikzpicture}}
 \newframe*    %insert pause, click to continue
 \multiframe{250}{n=0+0.004}{    %n=0,0.01,...,1.0
  \begin{tikzpicture}
  \draw(6,-3)node[below=7mm]{$\gamma_{re}DS(P_7)$};
 \edges{1}
 \vertices{3pt}
\dsvertices{3pt}
\udsedges{1}
 \ldsedges{\n}
 \end{tikzpicture}}
  \newframe*
 \begin{tikzpicture}
 \draw(6,-3)node[below=7mm]{$\gamma_{re}DS(P_7)$};
  \edges{1}
    \vertices{3pt}
  \dsvertices{3pt}
  \udsedges{1}
 \ldsedges{1}
  \end{tikzpicture}
  \end{animateinline}
  \end{document}

相关内容