您的位置:首页 > 其它

[Latex][beamer]PGF and TiKz中演示文字沿路径移动的动画

2013-04-12 06:28 746 查看
[Latex][beamer]PGF and TiKz中演示文字沿路径移动的动画,就以beamer为例:

\documentclass{beamer}
%====================================================
\input{../setup/preamble.tex}
\input{../setup/tikzall.tex} %包含所有的tikz包
%====================================================
\begin{document}
%====================================================
\begin{frame}
%演示文字沿路径移动的动画
\begin{animateinline}[autoplay,loop]{2}
%总共生成6帧画面,以每秒2帧的速度自动播放
\multiframe{6}{Rpos=1+-0.2}{%Rpos=1,0.8,...,0.0
\tikz[allow upside down]{%
\useasboundingbox[draw] (-1cm,-1cm) rectangle(4cm,4cm);
\draw[name path=curveone] (0,0) .. controls +(right:3.5cm) and +(right:3.5cm) .. (0,3)
\foreach \p in {0,0.2,0.4,0.6,0.8,1} {node[sloped,above,pos=\p]{\p}};
\draw[name path=curveone] (0,0) .. controls +(right:3.5cm) and +(right:3.5cm) .. (0,3)
node[sloped,below,pos=\Rpos]{$\Rpos$};
}%
}%
\end{animateinline}

\end{frame}
%====================================================
\end{document}


效果是图如下:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: