将 pdf 输出转换为运动 gif

将 pdf 输出转换为运动 gif

以下代码给出了 cos x 的动画,该动画由 Henri Menke 的动画修改而来。您能否帮助使用 imagemagick 将此 pdf 输出转换为 GIF。我无法安装 imagemagick。

在此处输入图片描述

 \documentclass[tikz]{standalone}
    \usepackage{tikz}
    \providecommand{\myts}{\biolinum\scshape{M\hspace{-.061em}\raisebox{-.26351ex}{Y}\hspace{-.0961em}T\hspace{-.05161em}\raisebox{.2451ex}{S}}}
    \usepackage{libertineotf}
    \definecolor{darkcerulean}{rgb}{0.03, 0.27, 0.49}
    \usepackage{lucimatx}%remove this if the font is not available.
    \definecolor{bleudefrance}{rgb}{0.19, 0.55, 0.91}
    \begin{document}
    \foreach \angle in {0,10,...,360}
    {
      \begin{tikzpicture}
        % fill circle and plot
        \fill[yellow!50] (-1,0) arc (0:\angle:1) -- (-2,0) -- cycle;
        \fill[yellow!50] plot[smooth,domain=0:\angle] (pi/180*\x,{cos(\x)}) |- (0,0);
        % draw connection
        \draw (-2,0) +(\angle:1) circle (1.2pt) -- (pi/180*\angle,{cos(\angle)}) circle (1.2pt);
        % draw axes an ticks
        \draw (-3.5,0) -- (7,0);
        \foreach \deg in {90, 180, 270, 360}
          \draw (pi/180*\deg,2pt) -- (pi/180*\deg,-2pt) node[below] {$\deg^\circ$};
        \draw (0,-1.2) -- (0,1.2);
        \foreach \y in {-1,-0.5,0.5,1}
          \draw (2pt,\y) -- (-2pt,\y) node[left] {$\y$};
        % draw plot and circle outline
        \draw plot[smooth,domain=0:360] (pi/180*\x,{cos(\x)});
        \draw (-2,0) circle (1);
    \draw[color=bleudefrance] (3.05,.905) node {\bf\scalebox{1.17596}{\myts}};
    \draw[color=darkcerulean] (3.0425921085,.67295) node {\it\scalebox{.2196875}{Mathematical Young Talent  Search}};
    \end{tikzpicture}
    }
    \end{document}

相关内容