I found this image on Beautiful Mathematical GIFs Will Mesmerize You and this GIF really caught my attention. From what I see, it's a 2D circle morphing into the 3D sphere. What function could describe this GIF animation? All comments are appreciated.
z < 0 -> red
z > 0 -> green
z = 0 -> blue

Here's a pretty direct translation to Mathematica of the processing code pointed out by horchler. It's littered with spherical coordinates and I've placed the path on a sphere so that we can clearly see its 3D origin.
Here's my original answer that I obtained by just looking at the image.
We can get something like the middle phase as follows. First, define $r_1$ and $r_2$ by $$ \begin{align} r_1(t) &= \sqrt[3]{|\cos(t/m)|} \\ r_2(t) &= \sqrt{|\cos((t-m\pi)/n)}, \end{align} $$ where $m=3$ and $n=9$. Then, $$ p(t) = \left\{ \begin{array}{cc} r_1(t) \, \langle \cos(t), \text{sgn}(r_1(t)) \sin(t) \rangle & 0 \leq t \leq m\pi \\ r_2(t) \, \langle \cos((t-(m-1)\pi)), -\text{sgn}(r_2(t)) \sin((t-(m-1)\pi)) \rangle & m\pi < t \leq (m+n)\pi. \end{array} \right. $$ We can plot it in Mathematica:
I can't quite seem to get the animation, though.