0

How do I make a animated filled circle that gets smaller and changes its color? I'm using the beamer class.

closed as off-topic by Raaja, user156344, Sebastiano, Stefan Pinnow, TeXnician Mar 16 at 9:40

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    In order to ensure no marmots are harmed in producing an answer I think the cover page of this explanation says it perfectly \usepackage[dynamic opacity]{caution} optical-astronomy.education/onewebmedia/var2.pdf – user170109 Mar 15 at 14:13
  • Please provide us with an MWE that shows what you have tried. Judging from your previous question, there is a chance you want to embed it into a beamer document. If so, this changes the story because beamer comes with \animate, and it definitely allows you to animate the color of a circle, the radius or both. – user121799 Mar 15 at 15:40
  • 1
    @marmot yeah sorry that i did not provide any MWE becuase I did not know how to get even started. But thank you for showing me how to animate a circle really helpful! – Simba Mar 15 at 18:58
  • 3
    Changing the question in after having accepted an answer is IMHO not a good style. Anyone considering to write an answer here should be warned that this may happen to your answer as well. – user121799 Mar 15 at 21:56
  • 4
    I'm voting to close this question as off-topic because it is a do it for me question. – Raaja Mar 16 at 8:18
5

Assuming you want beamer again.

\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}

enter image description here

In order to show the animation in a presentation, view it with acroread in full screen mode.

  • thanks again. Now i made a "MWE" in order to get this control panel. – Simba Mar 15 at 21:46
  • 1
    Of course did not think about that. Won't happen again! – Simba Mar 16 at 9:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.