I want to prove that $T^2=\{(x,y,z)\in\mathbb{R}^3:(\sqrt{x^2+y^2}-R)^2+z^2=r^2\}\ (r<R)$ is a smooth manifold. Since I am a student in physics and haven't learned much math, so I want to prove it by constructing an atlas with smooth transition functions.
I tried taking something like $U_1=T^2\backslash\{(R\cos\theta,R\sin\theta,r):\theta\in[0,2\pi)\}\cup\{(R+r\cos\theta,0,R+r\sin\theta):\theta\in[0,2\pi)\}$ (namely a torus deleting the circle on the top and the circle in half plane $y=0,x>0$) and $\phi_1:U_1\to(0,2\pi)\times(0,2\pi):(R\cos\theta+r\cos\theta\sin\phi,R\sin\theta+r\sin\theta\sin\phi,r\cos\phi)\to(\theta,\phi)$. Then I found that it seems I need to construct 2 more similar charts to get an atlas. Am I correct? Can we construct it more elegantly?
A more elegant approach is to use the preimage theorem. Consider the smooth function $$ f: (x,y,z)\to \left(R-\sqrt{x^2+y^2}\right)^2+z^2 $$ from $\mathbb R^3$ to $\mathbb R$ and show that $r^2\in \mathbb R$ is a regular value.