Creating some gif with tikz: Any idea to get better result?

by rihani   Last Updated August 14, 2019 15:23 PM

I have used this tikz to generate some GIF. Here are the code and the result. Any idea to make it better

\documentclass[tikz,border={2pt 2pt 2pt 2pt}]{standalone}
 \usepackage{tikz}
 \begin{document}
 \foreach \angle in {0,10,...,360}
{
 \begin{tikzpicture}
 \draw (0,0) circle (1);
 \node at ({cos(\angle)},{sin(\angle)}) {\textcolor{blue}{$\bullet$}};
 \end{tikzpicture}
   }
\end{document}

enter image description here



Answers 1


You could put a rectangular path around the whole diagram and make it only go to 350° so you don't get the pause at the beginning of the loop.

\documentclass[tikz]{standalone}
\begin{document}
\foreach \angle in {0,10,...,350}
{
  \begin{tikzpicture}
    \path (-1.2,-1.2) rectangle (1.2,1.2);
    \draw (0,0) circle (1);
    \node at ({cos(\angle)},{sin(\angle)}) {\textcolor{blue}{$\bullet$}};
  \end{tikzpicture}%
}
\end{document}

MWE output

David Purton
David Purton
August 14, 2019 15:01 PM

Related Questions


Animated tikz matrix inside a flowchart node

Updated June 30, 2017 17:23 PM

Tikz animated figure coordinates from a vector

Updated August 23, 2015 18:10 PM

Making skydiving more realistic

Updated August 31, 2018 05:23 AM

Draw an animated gif of trigonometry function

Updated October 28, 2018 11:23 AM

Is it possible to introduce animation in TikZ

Updated March 28, 2019 18:23 PM