4
\documentclass[pstricks,border=15pt,12pt]{standalone}
\usepackage{pst-node,multido}

\begin{document}
\multido{\n=0+1, \i=90+-1}{91}{%
\begin{pspicture}[showgrid=true](5,5)
\psarc{->}(0,0){1}{0}{\n}
\psarc{->}(0,0){2}{0}{\n}
\psarcn{->}(0,0){4}{90}{\i}
\psarcn{->}(0,0){5}{90}{\i}
\end{pspicture}}
\end{document}

enter image description here

\documentclass[pstricks,border=15pt,12pt]{standalone}
\usepackage{pst-node,multido}

\begin{document}
\multido{\n=0+1,\i=90+-1}{46}{%
\begin{pspicture}[showgrid=true](5,5)
\psarc{->}(0,0){3}{0}{\n}
\psarcn{->}(0,0){3}{90}{\i}
\end{pspicture}}
\end{document}

enter image description here

Question:

How to combine two animations above with a single loop?

5

\documentclass[pstricks,border=15pt,12pt]{standalone}
\usepackage{pst-node,multido}

\begin{document}
\multido{\in=0+1,\i=90+-1}{91}{%
  \begin{pspicture}[showgrid=true](5,5)
  \psarc{->}(0,0){1}{0}{\in}
  \psarc{->}(0,0){2}{0}{\in}
  \psarcn{->}(0,0){4}{90}{\i}
  \psarcn{->}(0,0){5}{90}{\i}
  \ifnum\in>45
    \def\nn{45}
    \def\ii{45}
  \else
    \edef\nn{\in}
    \edef\ii{\i}
  \fi
  \psarc{->}(0,0){3}{0}{\nn}
  \psarcn{->}(0,0){3}{90}{\ii}
  \end{pspicture}%
}
\end{document}
  • I have just compiled your code but my second code is stopped a time. How to it is worked independently. – user173875 Dec 23 '18 at 13:01
  • I do not understand your question. – AlexG Dec 23 '18 at 14:32
  • Clearly, the arc (3cm) is repeated 2 times when the different arcs only repeated 1 time? – user173875 Dec 23 '18 at 15:58
3

Just another idea.

Version 1 (slowed down)

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{multido}

\begin{document}
\multido{\ia=0+1,\ib=90+-1}{91}{%
  \begin{pspicture}[showgrid=true,arrows=->,arrowinset=0](5,5)
  \psarc(0,0){1}{0}{\ia}
  \psarc(0,0){2}{0}{\ia}
  \psarcn(0,0){4}{90}{\ib}
  \psarcn(0,0){5}{90}{\ib}
  \psarc(0,0){3}{0}{!\ia\space 2 div}
  \psarcn(0,0){3}{90}{!45 \ib\space 2 div add}
  \end{pspicture}}
\end{document}

enter image description here

Version 2 (relaunched)

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{multido}

\begin{document}
\multido{\ia=0+1,\ib=90+-1}{91}{%
  \begin{pspicture}[showgrid=true,arrowinset=0,arrows=->](5,5)
  \psarc(0,0){1}{0}{\ia}
  \psarc(0,0){2}{0}{\ia}
  \psarcn(0,0){4}{90}{\ib}
  \psarcn(0,0){5}{90}{\ib}
  \psarc(0,0){3}{0}{!\ia\space 45 gt {\ia\space 45 sub} {\ia} ifelse}
  \psarcn(0,0){3}{90}{!\ib\space 45 lt {\ib\space 45 add} {\ib} ifelse}
  \end{pspicture}}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy