\documentclass{article}
\thispagestyle{empty}
%\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill=cyan] (0,0) rectangle (1,-1);
\draw[gray,fill=cyan!40!white] (8,0) rectangle (9,-1);
\draw[gray,fill=cyan!40!white] (0,-5) rectangle (1,-6);
\draw[fill=cyan] (8,-5) rectangle (9,-6);
\foreach \x in {90,89,...,-90} { % change 89 to 80 for speed
% \elrad is the x-radius of the ellipse (technically, a circle seen
% from side on at angle \x).  The 'max' is because at small angles
% then the real ellipse is too thin and the torus doesn't ``fill
% out'' nicely.
\pgfmathsetmacro\elrad{20*max(cos(\x),.1)}
\pgfmathsetmacro\lscale{1-abs(\x-45)/180}
\pgfmathsetmacro\rscale{abs(\x+45)/180}
% We draw the torus from the back to the front to get the right
% layering effect.  To tint it, we define colours according to the
% angle, but need different colours for the left and right pieces.
% It'd be nice if the xcolor colour specification could take something
% computed by pdfmath, such as {red!\tint} but it doesn't appear to
% work, so we define the colours explicitly.
\pgfmathsetmacro\ltint{.9*abs(\x-45)/180}
\pgfmathsetmacro\rtint{.9*(1-abs(\x+45)/180)}
\definecolor{currentcolor}{rgb}{\ltint, 0, \ltint}
% This draws the right-hand circle.
\draw[color=currentcolor,fill=currentcolor] (4.3cm,-.5cm) +(xyz polar cs:angle=\x,y radius=.75,x radius=1.5) ellipse (\elrad*\lscale pt and 20*\lscale pt);
% This sets the colour correctly for the left-hand circle ...
\definecolor{currentcolor}{rgb}{\rtint, 0, \rtint}
% ... and draws it
\draw[color=currentcolor,fill=currentcolor] (4.3cm,-.5cm) +(xyz polar cs:angle=180-\x,radius=.75,x radius=1.5) ellipse (\elrad*\rscale pt and 20*\rscale pt);
% End of foreach statement
}
\shadedraw[shading=ball,ball color=red] (3,-5.5) .. controls (3.5,-5.5) and (4,-4.5) .. (4.5,-4.5) .. controls (5,-4.5) and (6,-5) .. (6,-5.5) .. controls (6,-6) and (5,-6.5) .. (4.5,-6.5) .. controls (4,-6.5) and (3.5, -5.5) .. (3,-5.5);
\draw[->] (1.2,-0.5) -- node[auto=left] {\(\phi\)} (2.4,-0.5);
\draw[->, color=gray] (1.2,-5.5) -- (2.4,-5.5);
\draw[->, color=gray] (6.4,-0.5) -- (7.8,-0.5);
\draw[->] (6.4,-5.5) -- node[auto=left] {\(\psi\)} (7.8,-5.5);
\draw[->] (4.5,-1.8) -- node[auto=left] {\(f\)} (4.5,-4);
\end{tikzpicture}
\end{document}

