Say that a bead is on a wire that has shape $x^2+z^2/\kappa^2 =1$, where the wire can rotate about the $z$-axis. Gravity acts upon the bead. I can take $\theta,\phi$ as two generalized coordinates. $\theta$ is the angle from positive $z$, anticlockwise. $\phi$ is rotation in the $x-y$ plane.
I am confused about two things: 1) Do two generalized coordinates actually determine this system? If the wire was a circle, then the length from the origin to the wire would be constant, but it is an ellipse, so the length is not invariant. Is it because $\theta$ determines the length? So we only need $(l,\theta,\phi)$ but $l(\theta)$ is the length, dependent on $\theta$?
2) How is the kinetic energy found? I'd think we would take $\frac12 mv^2$, but I am not sure how to do that, in terms of the generalized coordinates. Does one still write $\vec{r}=(x,y,z)$ and derive this, and take the norm, or do we work this out as $q=(q_1,q_2)=(\theta,\phi)$ and $T(q_1,q_2)=\frac12m\|\dot{q}\|^2$?
Do I take $(x,y,z)=(\cos(-\theta+\frac\pi2),\cos(\phi),\sin(-\theta+\frac\pi2))=(\sin(\theta),\cos(\phi),\cos(\theta))$ and $$\vec{r}=(\cos(\theta)\dot{\theta},-\sin(\phi)\dot{\phi},-\sin(\theta)\dot{\theta})$$ $$\|\dot{\vec{r}}\|^2 = \dot{\theta}^2+\sin^2(\phi)\dot{\phi}^2$$ $$T=\frac12m(\dot{\theta}^2+\sin^2(\phi)\dot{\phi}^2)$$ Is that what I want?