$\hat{e}_R$ is the unit radial vector. This is simply $(x,y,z)$ divided by its length, $r$: $\hat{e}_R=\frac{(x,y,z)}{r}$.
$\hat{e}_\theta$ is the unit vector tangent to the sphere, thus perpendicular to $(x,y,z)$, which is also perpendicular to $(0,0,1)$ since changing $\theta$ does not change $z$. Therefore, we simply need to take the cross product of $(x,y,z)$ and $(0,0,1)$ and normalize to get $\hat{e}_\theta=\frac{(-y,x,0)}{\sqrt{r^2-z^2}}$. The sign is chosen so that the vector points counter-clockwise.
$\hat{e}_\phi$ is perpendicular to the other two, so we take the cross product and normalize: $\hat{e}_\phi=\frac{(-xz,-yz,r^2-z^2)}{r\sqrt{r^2-z^2}}$. Again, the sign is chosen to have positive $z$ component.
Thus, we get
$$
\begin{align}
\hat{e}_R&=\frac{(x,y,z)}{r}\\
\hat{e}_\theta&=\frac{(-y,x,0)}{\sqrt{r^2-z^2}}\\
\hat{e}_\phi&=\frac{(-xz,-yz,r^2-z^2)}{r\sqrt{r^2-z^2}}
\end{align}
$$
References
- Source of the polar-coordinate image here from Wikipedia.
Geometric
Here is a geometric illustration:
Start with two circles around the origin $O$, one with radius $OA=a$, the other with radius $OB=b$. Choose $A$ so its angle is $\theta$ (marked in cyan). Then projecting that onto the $x$ axis will give $OC=a\cos\theta$. Construct a line perpendicular to $OA$ and intersect it with the other circle to obtain $B$. Make sure to choose the right point of intersection: $B$ should be $90°$ behind $A$ in terms of angle, since $\sin$ is $90°$ begind $\cos$. Projecting $B$ onto the $x$ axis gives $OS=b\sin\theta$. Now you could add these projections, but you could also add the original vectors $OA$ and $OB$ to obtain $OD$ and then project the result $D$ to get $OE=a\cos\theta+b\sin\theta$.
Now as you rotate $A$, $B$ and $D$ will rotate along with it. So you can see that as $D$ moves at the same speed but on a larger circle, its projection $E$ will follow a cosine function so you have $OE=d\cos(\theta+\theta_0)$. You can use the Pythagorean theorem to find that $d^2=a^2+b^2$. You can also see that angle $\theta_0$, marked in orange and negative in my case. It's the angle between ray $OA$ and $OD$, and is defined by $\tan\theta_0=-\frac ba$ unless I got a knot in my thoughts with the sign. As usual when using a tangens to compute an angle from a fraction, make sure you end up in the correct quadrant, perhaps use an atan2
function if available.
Complex numbers
Since others answers brought up complex numbers, here is what you get if you do all of this in complex numbers:
\begin{align*}
A &= ae^{i\theta}=a\cos\theta+ai\sin\theta \\
B &= -bie^{i\theta}=b\sin\theta-bi\cos\theta \\
C &= \operatorname{Re}A = a\cos\theta \\
S &= \operatorname{Re}B = b\sin\theta \\
D &= A+B = (a-bi)e^{i\theta} = (de^{i\theta_0})e^{i\theta}
= de^{i(\theta+\theta_0)}\\
E &= \operatorname{Re}D = a\cos\theta+b\sin\theta = d\cos(\theta+\theta_0)
\end{align*}
So the core aspect here is the conversion from the Cartesian coordinates $a-bi$ to the polar coordinates $de^{i\theta_0}$. Which again can be characterized by $d^2=a^2+b^2$ and $\tan\theta_0=-\frac ba$. To avoid confusion: $a,b,d,\theta_0$ are all real numbers here.
Best Answer
A sinusoid is a function which can be written in the form $f(x) = R\sin (ax + b)$. So for example $\cos x = \sin (-x + \frac{\pi}{2})$, and so forth.
It sounds like your sinusoidal spiral is a generalisation of this: Wikipedia page has more information.