\documentclass{article}
\thispagestyle{empty}
%\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\path[use as bounding box] (-1,2.3) rectangle (8,-1.5);
\foreach \t in {0,0.05,...,1} {
\pgfmathsetmacro\x{6*\t^3 + 4 * 3 * \t^2*(1 - \t) + 2 * 3 * \t * (1 -\t)^2 + 0 * (1 - \t)^3}
\pgfmathsetmacro\z{-1*\t^3 + -1 * 3 * \t^2*(1 - \t) + 1 * 3 * \t * (1 -\t)^2 + 1 * (1 - \t)^3 + 2}
\pgfmathsetmacro\y{-1*((\z - 1) < 1) * sqrt(abs(1 - (\z-1)^2))}
\pgfmathsetmacro\tt{\t+.05}
\pgfmathsetmacro\xx{6*\tt^3 + 4 * 3 * \tt^2*(1 - \tt) + 2 * 3 * \tt * (1 -\tt)^2 + 0 * (1 - \tt)^3}
\pgfmathsetmacro\zz{-1*\tt^3 + -1 * 3 * \tt^2*(1 - \tt) + 1 * 3 * \tt * (1 -\tt)^2 + 1 * (1 - \tt)^3 + 2}
\pgfmathsetmacro\yy{-1*((\zz - 1) < 1) * sqrt(abs(1 - (\zz-1)^2))}
\begin{scope}
%\path[clip] (\x,3,0) rectangle (\x,-2,-\z-3);
%\path[shade=axis, top color=red, bottom color=black]
% If second control is relative, it is relative to second end point!
\path[shade=axis, top color=red!90!black, bottom color=black]
 (\xx,0,-\zz-2)
 .. controls +(0,-.555,0) and +(0,0,-.555) ..
 ++(0,-1,1)
 .. controls +(0,0,.139) and +(0,-.0516,-.129) ..
 ++(0,.072,.371)
 -- (\x,-0.928,-\z-.629)
 .. controls +(0,-.0516,-.129) and +(0,0,.139) ..
 ++(0,-.072,-.371)
 .. controls +(0,0,-.555) and +(0,-.555,0) ..
 ++(0,1,-1)
 -- (\xx,0,-\zz-2);
\end{scope}
\begin{scope}
\pgfmathsetmacro\yb{(\y < 0)*\y + (1 - (\y < 0))*2}
\pgfmathsetmacro\yyb{(\y < 0)*\yy + (1 - (\y < 0))*2}
\clip (\x,\yb,-2) -- (\xx,\yyb,-2) -- (\xx+2,\yyb,-2) -- (\xx+2,\yyb-5,-2) -- (\x-2,\yb-5,-2) -- (\x-2,\yb,-2) -- (\x,\yb,-2);
\path[shade=axis, top color=green, bottom color=black]
 (\xx,0,-\zz)
 .. controls +(0,-.417,0) and +(0,.155,.387) ..
 ++(0,-0.928,-0.629)
 -- (\x, -0.928,-\z-.629)
 .. controls +(0,.155,.387) and +(0,-.417,0) ..
 ++(0,.928,.629)
 -- (\xx,0,-\zz);
\end{scope}
\pgfmathsetmacro{\zz}{-\zz+2}
\pgfmathsetmacro{\z}{-\z+2}
\begin{scope}
\clip (\x,\y,-2) -- (\xx,\yy,-2) -- (\xx+2,\yy,-2) -- (\xx+2,\yy-5,-2) -- (\x-2,\y-5,-2) -- (\x-2,\y,-2) -- (\x,\y,-2);
\path[shade=axis, top color=red!90!black, bottom color=black]
 (\xx,0,-\zz-2)
 .. controls +(0,-.555,0) and +(0,0,-.555) ..
 ++(0,-1,1)
 .. controls +(0,0,.139) and +(0,-.0516,-.129) ..
 ++(0,.072,.371)
 -- (\x,-0.928,-\z-.629)
 .. controls +(0,-.0516,-.129) and +(0,0,.139) ..
 ++(0,-.072,-.371)
 .. controls +(0,0,-.555) and +(0,-.555,0) ..
 ++(0,1,-1)
 -- (\xx,0,-\zz-2);
\end{scope}
\begin{scope}
\path[shade=axis, top color=green, bottom color=black]
 (\xx,0,-\zz)
 .. controls +(0,-.417,0) and +(0,.155,.387) ..
 ++(0,-0.928,-0.629)
 -- (\x, -0.928,-\z-.629)
 .. controls +(0,.155,.387) and +(0,-.417,0) ..
 ++(0,.928,.629)
 -- (\xx,0,-\zz);
\end{scope}
}
\end{tikzpicture}
\end{document}

