如何使動畫圓圈變得更小、更暗

如何使動畫圓圈變得更小、更暗

如何製作一個變小​​並改變顏色的動畫實心圓?我正在使用投影機類。

答案1

假設您再次想要投影機。

\documentclass{beamer}
\usepackage{tikz}
\usepackage{amsmath}
\newcount\mypar

\begin{document}
\transduration{2}
\animate<2-22>
\begin{frame}[t,fragile]{Frame title}
\animatevalue<2-21>{\mypar}{0}{20}
\centering
\begin{tikzpicture}
 \pgfmathtruncatemacro{\myfrac}{50+50*cos(\mypar*18)}
 \pgfmathsetmacro{\myradius}{3+cos(\mypar*18)}
 \path[use as bounding box] (-4.2,-4.2) rectangle (4.2,4.2);
 \fill[yellow!\myfrac!red] circle[radius=\myradius];
\end{tikzpicture}
\end{frame}
\end{document}

在此輸入影像描述

為了在簡報中顯示動畫,請使用 acroread 在全螢幕模式下檢視。

相關內容