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


Tags :

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}


David Purton
August 14, 2019 15:01 PM