Explicit homeomorphism between quotient square and torus Let $X = [0,1] \times [0,1]$, and let consider the quotient topology $X^* := X / ((x,0) \sim (x,1), (0,y) \sim (1,y))$. Given $r_0 > h > 0$, we define explicitly the torus as:
$$
Y_{h,r_0} = \left\{(x,y,z) : z^2 = h^2 - \left(r_0 - \sqrt{x^2 + y^2}\right)^2\right\}
$$
I want to construct an explicit homeomorphism $f : X^* \to Y_{h,r_0}$.

I believe I've managed to come up with the homeomorphism. We express points in $Y_{h,r_0}$ in terms of cylindrical coordinates, and define $f$ as follows:
$$
f(x,y) = (r_0 - h\cos(2\pi y), 2\pi x, h\sin(2\pi y))
$$
One can check that this is well-defined up to quotient topology, and is clearly continuous as it is continuous coordinate-wise. I've also constructed the inverse map $g : Y_{h,r_0} \to X^*$:
$$
g(r,\theta,z) = \left(\frac{\theta}{2\pi}, \frac{1}{2\pi}\arg(r_0 - r + iz)\right)
$$
One can also check that this well defined up to quotient topology, and it is both the left and the right inverse of $f$. However, I'm struggling to prove that it is continuous (I'm not entirely sure if it's even continuous). I believe the second argument is indeed continuous, but it seems complicated. I'm also not sure if it's possible to define $g$ differently such that no complex numbers are involved, and the function will still not be too complicated.
Any help is appreciated.
 A: The map $f$ you construct is a mapping $X\rightarrow Y$. The coordinate-wise continuity proves that $f$ is continuous. The well-definedness means the map factors through $\pi:X\rightarrow X^*$, that is there exists $\tilde{f}: X^*\rightarrow Y$ such that $\tilde{f}\circ \pi=f$. I'm not sure how you shows that $\tilde{f}$ is continuous, but I would show that the projection $\pi$ is open, and then the preimage of $U$ by $\tilde{f}$ would be the set $\pi(f^{-1}(U))$, open.
In the same vein, perhaps you can show that $f$ is open (by considering small enough ball). Then let $U$ be an open set of $X^*$. $\tilde{f}(U)=f(\pi^{-1}(U))$ is an open set, and hence $\tilde{f}$ is an open map. $\tilde{f}$ is continuous, bijective, open, then it must be a homeomorphism.

The above relies on the two following assumptions: (i) $\pi$ is open (ii) $f$ is open, which I believe provable by considering small balls and using your explicit formula. Maybe there is a quotient of $\mathbb{R}^2$ homeomorphic to $X^*$, which would save us from the boundary of $X$.
A: your construction might work but verifying its validity takes time, so I would recommend the following process. I'll provide two methods in total because the second one aims to help you prove the continuity. :)
Note: the second one is almost the same as your process but I'll change something.
Let $T$ denote the torus.



*

*$T$ can be imbedded in 4-D space by $$T=\{(\cos(2\pi x),\sin(2\pi x),\cos(2\pi y),\sin(2\pi y)):x,y\in[0,1)\}\subset\Bbb{R}^4$$ which implies that any point in $T$ is on two circles simultaneously.


Def $f:X^*\to T$ explicitly by $$f(x,y)=((\cos(2\pi x),\sin(2\pi x)),(\cos(2\pi y),\sin(2\pi y)))$$
This is a continuous bijection from a compact space to a hausdorff space because each coordinate function is continuous and $x,y\in[0,1]$. And also well-defined since $f(0,y)=(1,0,\cos(2\pi y),\sin(2\pi y))=f(1,y)$ & similarly $f(x,0)=f(x,1)$
Now, take a closed set $A\subset X^*$, then $A$ is compact. And, $f(A)\subset T$ is also compact because $f$ is continuous, and is closed because it's a compact subspace of a Hausdorff space. Thus, its inverse is continuous $\implies$ homeomorphism. (does not require complex numbers)



*Let $R$ denote the distance from the center of $T$ to the center of the tube (hope this is clear, if not pls let me know) and $r$ denote the radius of the tube.


Define $f:X^*\to T$ using the parametrical definition of a torus. 
$$(x,y)\mapsto (x',y',z')$$
$$f(x,y)=((R+r\cos (2\pi x))\cos (2\pi y),(R+r\cos (2\pi x))\sin (2\pi y),r\sin (2\pi x))=(x',y',z')$$
which is continuous and bijective cuz you already know that.
In this case $f^{-1}$ should be the following one, not $g$ in your post.
$$(x',y',z')\mapsto (x,y)$$
$$f^{-1}(x',y',z')=\bigg(\dfrac{\tan^{-1}(\frac{z'}{\sqrt{x'^2+y'^2}-R})}{2\pi},\dfrac{\tan^{-1}(\frac{y'}{x'})}{2\pi}\bigg)=(x,y)$$
You can substitute the expression for $x',y',z'$ to verify it.
Give a sequence $(x'_n)\to0$, $\tan(y'/x'_n)\to \pi/2$ (the limit exists because our the domain is restricted) $\implies $ the $y$-coordinate function is indeed continuous at that point, similarly for $x$-coordinate function. Thus $f^{-1}$ is continuous, and we're done. Note that I didn't use complex numbers and the argument isn't so long.
