Given the following sphere and cylinder,
$$\begin{align} x^2+y^2+z^2&=4R^2,\\ (x-R)^2+y^2&=R^2, \end{align}$$
find a parametric equation of their intersection.
I know that their intersection is called a hippopede and that on the $x$-$y$ plane, its parametrization is $r(t)=R(\cos t+1)\,\hat i+R\sin t\,\hat j$. However, I have no idea how to find its $\hat k$ component.
Any hint would be appreciated!
Edit: The $\hat k$ component is supposed to be
$$ 2R\sin\left(\frac t2\right), $$
but I have no idea how that was obtained.