I'm learning about constraints and I know the following: If there are $N$ particles in 3 dimensional space, I have $3N$ degrees of freedom. If I have $n_b$ holonomic constraints and I switch over to generalized coordinates, I'm left with $n_q = 3N - n_b$ degrees of freedom.
Now let me give an example:
1 particle moves over the surface of a sphere. This initially gives me 3 degrees of freedom ($x$, $y$ and $z$). Now using the 1 holonomic constraint I have (the surface of the sphere, $x^2+y^2+z^2=R$) I should be left with 2 degrees of freedom.
This is where I get lost and don't know what else to do, my book says these 2 new degrees of freedom are angles, namely $\theta$ and $\phi$ and that that would give me the following:
$$x=R\sin{\theta}\cos{\phi}$$
$$y=R\sin{\theta}\sin{\phi}$$
$$z=R\cos{\theta}$$
How do I know that these 2 new degrees of freedom (my generalized coordinates) are angles and how do I find the equations to express $x$, $y$ and $z$ in these new coordinates?