# [pstricks] problems with animate

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Dec 29 11:19:12 CET 2012

Am 28.12.2012 21:12, schrieb Cyrille Piatecki:

> doesn't work correctly since it create some deformation of the grid and
> the function. Also, i have tried to use the star version of pspicture
> but it seems not to work

Cyrille,

you'll also find a lot of examples on the http://pstricks.tug.org
for animations with package animat.

\documentclass{report}
\usepackage{animate}
\pagestyle{empty}
\begin{document}

\def\f1{%
\psline{<->}(4,4)(4,1)(10,1)
\rput(3.8,4){\tiny $C_1$}
\rput(10.4,1){\tiny $C_0$}}
\newcommand\cdi[1]{\psplot[linecolor=red,linewidth=2pt,algebraic]{.5}{4.5}{#1
* x^(-0.43)}}

\begin{animateinline}[
poster=first,controls,step,
begin={\begin{pspicture}(0,0)(14,5)},
end={\end{pspicture}}]{20}
\rput(0,0){\f1}
\newframe
\multiframe{10}{rvalue=.5+.5}{%
\rput(0,0){\f1}\rput(8,4){\rvalue}
\psset{origin={4,1}}
\cdi{\rvalue}}
\end{animateinline}

\end{document}

Herbert