\begin{tikzpicture}[scale=\textwidth/10cm,samples=200] % Handle \begin{scope}[shift=(10:7/8), rotate=-30, yslant=1/2, xslant=-1/8] \shade [top color=gray!80, bottom color=gray!30] (0,0) arc (130:-100:3/8 and 1/2) -- ++(0,1/4) arc (-100:130:1/8 and 1/4) -- cycle; \shade [top color=gray!10, bottom color=gray!60] (0,0) arc (130:-100:3/8 and 1/2) -- ++(0,1/32) arc (-100:130:1/4 and 1/3) -- cycle; \end{scope} % Cup \fill [black!75, path fading=fade out] (0,-1) ellipse [x radius=3/4, y radius=1/2]; \shade [left color=gray!60, right color=gray!30] (-1,0) arc (180:360:1 and 5/4); \shade [bottom color=gray, top color=gray!30, opacity=1/2] (-1,0) arc (180:360:1 and 5/4); \shade [left color=gray!20, right color=gray!40] (0,0) ellipse [x radius=1, y radius=1/2]; \shade [left color=gray!40, right color=gray!20] (0,0) ellipse [x radius=1-1/16, y radius=1/2-1/16]; \shade [bottom color=gray, top color=gray!10, opacity=1/2] (0,0) ellipse [x radius=1-1/16, y radius=1/2-1/16]; \draw (0,-1.7) node {$X = $ A Coffee Cup}; \draw[-{Latex[length=3mm,width=3mm]}] (1.5, -.5) .. controls (2, -1) and (2.5, .5) ..(4.2, -.5); \draw (3.0,0) node {$f: X \to Y$}; \end{tikzpicture}