There's something strange going on with the animation at 135 degrees. I can't figure out what's going wrong.

Here's the MWE:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{animate}
\newcommand{\crankshaft}[1]{%
\begin{tikzpicture}[x=0.5cm,y=0.5cm]
\draw[fill] (0,0) coordinate [label=180:Z] (Z) circle (2pt); %% center of the picture
\draw[fill] (5,5) coordinate [label=135:Q] (Q) circle (2pt); %% center of the circle
\draw[fill] (Q) -- +( 0:6) coordinate [label=0:A] (A) circle (2pt); %% first point on the circle
\clip[draw] (Q) circle (4.5cm);
\draw[help lines,blue!20,step=1] (0,0) grid (12,12);
%% drawing the circle
\draw[blue] (A)
let \p1 = ($ (A) - (Q) $) in
arc(0:360:{veclen(\x1,\y1)});
\draw [line width=0.4pt,red]
let \p1 = ($(A) - (Q)$), \n1={veclen(\x1,\y1)} in
(Q) -- +(#1:\n1)
coordinate (B) circle (2pt);
\draw[purple,line width=0.4pt]
(B) -- +($ (0,0) ! 2em ! 0 : ($(B)-(Q)$) $)
coordinate [label=center:{\textbf{B:#1}}] (Bl) circle (2em);
\draw[blue]
($ (B) ! 0.45 ! (Q) $)
coordinate (tC) circle (2pt);
\draw[line width=01.5em,->]
(tC)
let \p1 = ($(tC) - (Q)$),
\n1={atan2(\x1,\y1)}, %% start angle
\n2={\n1+90}, %% end angle
\n3={veclen(\x1,\y1)} %% radius
in
arc (\n1:\n2:\n3)
-- ++(\n2+80:1em)
;
\end{tikzpicture}%
}
\begin{document}
\begin{animateinline}[autoplay,loop]{1}
\multiframe{24}{iAng=0+15}{%
\crankshaft{\iAng}%
}%
\end{animateinline}
\end{document}




#1for\n1? You probably could also simplify a lot more … – Qrrbrbirlbel Feb 17 at 3:15\pgfmathparse{33.19675/-33.19678}\pgfmathresultand vary the divisor’s last digit. It jumps from-1.0(last digit:5) to-0.1(6to8) to-0.99998(9). – Qrrbrbirlbel Feb 17 at 5:22\pgfmathdivide@@macro has been patched (with the help of a few others). Changelog of2011-04-18. @A.Ellett Maybe it is time for you to update to the CVS version after all … – Qrrbrbirlbel Feb 17 at 8:42