I am working on an animation for a presentation - a grid is deformed and reformed. I cobbled together a quick animation that does what I want, but for some reason it also shrinks the drawing. Is this a known issue? Does anyone know how I can prevent this shrinkage?
For simplicity I have, in addition to the MWE, included an image which shows the first and last frames. Note how the lines at the extremes of the grid should end at the very same coordinates throughout the animation:
\documentclass{article}
\usepackage{tikz}
\usepackage{animate}
\begin{document}
\begin{animateinline}[controls,palindrome]{10}
\multiframe{10}{i=0+1}{%
\begin{tikzpicture}
\clip (0,0.3)..controls + (.075*\i,-2.5) and +(-.075*\i,2.5) .. (0,-6.3)--
(-0.3,-6)..controls + (2.5,-.075*\i) and +(-2.5,.075*\i) .. (6.3,-6)--
(6,-6.3)..controls + (-.075*\i,2.5) and +(.075*\i,-2.5) .. (6,.3)--
(6.3,0)..controls + (-2.5,.075*\i) and + (2.5,-.075*\i) .. (-.3,0);
\foreach \x in {0,...,6}{
\draw (\x,0.3)..controls + (.075*\i,-2.5) and +(-.075*\i,2.5) .. (\x,-6.3);
\draw (-0.3,-\x)..controls + (2.5,-.075*\i) and +(-2.5,.075*\i) .. (6.3,-\x);
}
\end{tikzpicture}}
\end{animateinline}
\end{document}