hi every1 with your previous help I managed to generate a animation of a rotating line using \multiframe within tikzpicture. In the following is a MWE for my animation.
\documentclass{beamer}
\usepackage{tikz}
\usepackage{animate}
\begin{document}
\begin{frame}
\centering
\begin{animateinline}[poster=first]{2}
% draw rotating line
\multiframe{20}{rt=0+5}{%
\resizebox{!}{.8\textheight}{\begin{tikzpicture}
%draw coordinate axis
\draw[thick, color=black, -latex] (-4.05,0) -- (4.05,0) node[right]{$x_1$};
\draw[thick, color=black, -latex] (0,-3.4) -- (0,3.4) node[above]{$x_2$};
%draw tilting red line
\draw[thick, color=red] ({4*cos(\rt)},{4*sin(\rt)}) -- ({-4*cos(\rt)},{-4*sin(\rt)});
\node at (5,5) {};
\node at (-5,-5) {};
\end{tikzpicture}}%
}
\end{animateinline}
\end{frame}
\end{document}
Does anyone know a way to hold the lines which are drawn on the previous frames such that on the first frame, there will only be one line, on the second frame there would be the line from the first frame plus the new drawn line and for the following frames respectively?
Is there a way other than generating the pdfs of all the frames individually and than use \animategraphics?
Thanks in advance!