\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}
\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}
问题:
如何通过一个循环将上面的两个动画结合起来?
答案1
\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}
答案2
这只是另一个想法。
版本 1(速度减慢)
\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}
版本 2(重新发布)
\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}