From the two-dimensional parametrization, we simply have $$\begin{align*} x(t) &= R \cos \bigl( \tfrac{r}{R}(t - \sin t) \bigr), \\\ y(t) &= R \sin \bigl( \tfrac{r}{R}(t - \sin t) \bigr), \\\ z(t) &= r - r \cos t. \end{align*}$$ Suitable choices for $r$ and $R$ will yield a closed curve, in which case the appropriate range for $t$ is $t \in [0, 2\pi R/r).$