다중 프레임 중첩

Oct 20 2020

다음이 가능한지 궁금합니다. 다른 매개 변수에 대한 신호의 시간 의존성을 시뮬레이션하기 위해 애니메이트 인라인 및 다중 프레임 환경을 중첩하고 싶습니다. 그런 것 :

\documentclass{standalone}
\usepackage{tikz}
\usepackage{animate}

\begin{document}
   \centering
%\begin{animateinline}[poster=first, label=graph_switch,controls=step]{2}
 %     \multiframe{20}{rt=0+5}{%
 \def\rs{1}
\begin{animateinline}[poster=first, label=graph_switch, autoplay]{5}
    \multiframe{15}{rt=0+5}{%
        \begin{tikzpicture}
        %draw coordinate axis
        \draw[thick, color=black, -latex] (-4.05,0) -- (4.05,0) node[right]{$y$};              
        \draw[thick, color=black, -latex] (0,-1.4) -- (0,1.4) node[above]{$t$};
         \draw[scale=1, domain=-4:4, smooth, variable=\t, blue] plot ({\t}, {\rs*sin(100*\t+\rt)});
        \node at (5,5) {};
        \node at (-5,-5) {}; 
        \end{tikzpicture}
    }%
\end{animateinline}
% }%
% \end{animateinline}
 \end{document}

그러나 이러한 중첩은 불가능하며 예제에서 4 줄의 주석 처리를 제거하면 오류가 발생합니다. 비슷한 것을 제시하는 해결 방법이 있습니까?

답변

1 AlexG Oct 20 2020 at 18:43

애니메이션을 여러 섹션으로 나누는 것은 이렇게 할 수 있습니다. 이 예에서 두 섹션은 일시 중지 ( \newframe*) 로 구분됩니다 . 계속하려면 클릭하세요.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{animate}

\begin{document}
\begin{animateinline}[poster=first, label=graph_switch, autoplay]{5}
  \multiframe{15}{rt=0+5}{%
    \def\rs{1}%
    \begin{tikzpicture}
    %draw coordinate axis
    \draw[thick, color=black, -latex] (-4.05,0) -- (4.05,0) node[right]{$y$};              
    \draw[thick, color=black, -latex] (0,-1.4) -- (0,1.4) node[above]{$t$};
      \draw[scale=1, domain=-4:4, smooth, variable=\t, blue] plot ({\t}, {\rs*sin(100*\t+\rt)});
      \node [anchor=north east] at (4,2) {$A=1$};
%    \node at (5,5) {};
%    \node at (-5,-5) {}; 
    \end{tikzpicture}
  }%
  \newframe*
  \multiframe{15}{rt=0+5}{%
    \def\rs{0.5}%
    \begin{tikzpicture}
    %draw coordinate axis
    \draw[thick, color=black, -latex] (-4.05,0) -- (4.05,0) node[right]{$y$};              
    \draw[thick, color=black, -latex] (0,-1.4) -- (0,1.4) node[above]{$t$};
      \draw[scale=1, domain=-4:4, smooth, variable=\t, blue] plot ({\t}, {\rs*sin(100*\t+\rt)});
      \node [anchor=north east] at (4,2) {$A=0.5$};
%    \node at (5,5) {};
%    \node at (-5,-5) {}; 
    \end{tikzpicture}
  }%
\end{animateinline}
\end{document}