Parametric equation for a space curve

With reference to the following image:

enter image description here

the blue curve has trivially a parametrization:

$$(x, y, z) = (\cos\theta, \, \sin\theta, \, 0) \; \; \; \text{with} \; \theta \in [0,\,2\pi)$$

I would like to determine the parametric equations of the red curve, very badly drawn in Paint, where I mean a sinusoidal curve along the blue circumference.

Although I thought about it a lot, I still couldn't figure out how to derive these parametric equation. Any ideas?


You can try$$\theta\mapsto\left(\cos\theta,\sin\theta,\frac{\cos(8\theta)}8\right),$$for instance.

enter image description here