# Need help with animated gradient

I am trying to get a nice gradient, but mine's a litte choppy. Maybe you can help me out with that. For a bette idea:

(from top to bottom: luminosity, expansion speed, radius)

## animation.tex

\documentclass[tikz]{standalone}
\usepackage{xcolor}

\begin{document}

\foreach \x in {60,62,...,100} %Color should change from white into a strong yellow
{
\begin{tikzpicture}[scale=.4]
\useasboundingbox[fill=black] (-10.2,-10.2) rectangle (10.2cm,10.2cm);
\fill[fill=yellow!\x] (0,0) circle (\Radius); %Here in the first frame should be the brightest color (white) and then change into a strong yellow
\end{tikzpicture}
}
\foreach \x in {100,98,...,60} %Color should change from strong yellow into a strong orange
{
\begin{tikzpicture}[scale=.4]
\useasboundingbox[fill=black] (-10.2,-10.2) rectangle (10.2cm,10.2cm);
\end{tikzpicture}
}
\foreach \x [count=\j] in {60,56,...,2} %Color should change into a light orange
{
\begin{tikzpicture}[scale=.4]
\useasboundingbox[fill=black] (-10.2,-10.2) rectangle (10.2cm,10.2cm);
\end{tikzpicture}
}
\foreach \x in {2,6,...,60} %Color should change into white
{
\begin{tikzpicture}[scale=.4]
\useasboundingbox[fill=black] (-10.2,-10.2) rectangle (10.2cm,10.2cm);
\end{tikzpicture}
}
\end{document}


## main.tex

\documentclass[tikz]{beamer}
\usepackage{animate}

\begin{document}
\begin{frame}[fragile]
\begin{center}
\animategraphics[controls,loop]{30}{animation}{}{}
\end{center}
\end{frame}
\end{document}


How about this? (I focus on the graphics, seeing you have found a nice way to include the animation in beamer.)

\documentclass[tikz]{standalone}
\usepackage{xcolor}

\begin{document}

\foreach \X in {0,2,...,358}
{\begin{tikzpicture}[scale=.4]
\useasboundingbox[fill=black] (-10.2,-10.2) rectangle (10.2cm,10.2cm);
\ifnum\X<91
\pgfmathtruncatemacro\OF{100*sin(\X)}
\colorlet{mixyo}{yellow!\OF!white}
\else
\ifnum\X<271
\pgfmathtruncatemacro\OF{50+50*sin(\X)}
\colorlet{mixyo}{yellow!\OF!orange}
\else
\pgfmathtruncatemacro\OF{-100*sin(\X)}
\colorlet{mixyo}{orange!\OF!white}
\fi
\fi