Homeomorphism between disk without two antipodal points and half-open square. Let $D^{2}$ be the unit disk in $\mathbb{R}^{2}$. Let $X=D^2-\{(0,1),(0,-1)\}$. 
Let $S$ be the square defined by $[-1,1] \times(-1,1)$.
I was asked to find a homeomorphism from $f:X \to S$.
Let $r^2=x^2+y^2$. Then,
let $$f(x,y)=\frac{\sqrt{r^2+\min\{|x|,|y|\}^2}}{r}\cdot[x,y]$$
Basically, I want to just project every point in the disk outward so that it intersects the square.
I feel that the bijectivity of this function is readily apparent. My main question is now how to prove that it is continuous (using only the most fundamental definition of continuity)
Edit: if an alternative homeomorphism is provided, please also give proof that both $f$ and $f^-1$ are continuous, this is most of the difficulty for me.
 A: Some intuition is good:

We consider the first arrow above, let's call it $f$, and let's call the diamond $\diamond$, the square $Q$ and the disk $D$ (all punctured).
Define
$$f:Q \rightarrow \diamond$$
$$(x,y) \mapsto (-x(y-1),y), \quad \text{if } 0 \leq y \leq 1; -1 \leq x \leq 0$$
$$(x,y) \mapsto (-x(-y-1),y), \quad \text{if } -1 \leq y \leq 0 ; -1 \leq x \leq 0$$
$$(x,y) \mapsto (x(1-y),y), \quad \text{if } 0 \leq y \leq 1; 0 \leq x \leq 1$$
$$(x,y) \mapsto (x(1+y),y), \quad \text{if } -1 \leq y \leq 0; 0 \leq x \leq 1 .$$
By the pasting lemma, this function is continuous. Its inverse is easily describable (very similar to the function itself), and by the pasting lemma it will also be continuous. I leave that to you to verify.
Now what is left is to construct a homeomorphism between $\diamond$ and $D$. But this is easy: they are the two balls of $\mathbb{R}^2$ under different norms without two points. Let's call the "filled" two balls $B_1$ and $B_2$. Note that $\eta: B_1 \rightarrow B_2$ given by $\eta(x)=\frac{x}{\Vert x\Vert_2}$ is clearly a homeomorphism (the inverse is $\frac{x}{\Vert x \Vert_1}$), and the two points we took off on both balls are points which are sent to each other. Therefore, the restriction to $\diamond$ will be bijective, and the restriction of a continuous function is continuous. Applying the same reasoning to the inverse, we have that this restriction is a homeomorphism. Composing $\eta|_{\diamond} \circ f$ gives us our homeomorphism.

The balls I mentioned are the sets $B_i=\{x \in \mathbb{R}^2 \mid \Vert x \Vert_i \leq 1\}$, where $\Vert \cdot \Vert_i$ are norms. The norm which gives the diamond is the $l_1$ norm, whereas the norm which gives the circle is the $l_2$ norm (standard norm in $\mathbb{R}^2$). Since norms are always continuous functions, the functions I mentioned (which furnish the homeomorphisms between the "balls") are continuous.
A: First, rote $X$ such that $(0,1)$ be on $(1,0)$. Let $F$ that rotation, which is not hardy to obtain. Now, let 
$$f(x,y)=\left(x,\dfrac{y}{\sqrt{1-x^2}}\right)$$ 
with inverse
$$g(x,y)=\left(x,y\sqrt{1-x^2}\right)$$ 
The map $f$ "projects" the inner disk $F(X)$ onto the semiopen square, so an homeomorphism could be $f\circ F:X\to S$ 
The geometric idea is take $(x,y)$ in the disk and, fixing $(x,0)$, stretch the segment joining $(x,y)$ and $(x,0)$ to obtain $(x,\sqrt{1-x^2})$ in $(x,1)$

A: Hint: a radial projection is going to send points in $X$ on the boundary of $D^2$ that are near to $(0, 1)$ to points that are in the interior of $S$ or are not in $S$ at all, so a radial (outward) projection like the one you have given won't work. However if you think about how $X$ and $S$ intersect the horizontal lines $y = t$ for $-1 \le t \le 1$, you should be able to design a homeomorphism of the form $(x, y) \mapsto (f(x, y), y)$ that does what you want.
(Strictly speaking, I should justify my remark that a radial projection won't work, by showing that the boundary and interior of $D^2$ and $S$ viewed as subsets of $\Bbb{R}^2$ can be defined by topological criteria that are independent of the embedding of these spaces in $\Bbb{R}^2$. This is true, but probably not relevant to you just now.)
A: $(x,y)\mapsto \left( \dfrac x {\sqrt{1-y^2}}, y \right)$ goes from the disk to the square.
Since $(x,y)$ is in the disk, we have $|x| \le \sqrt{1-y^2}$.  When $x$ is exactly $+\sqrt{1-y^2}$ or $-\sqrt{1-y^2}$ then then it gets transformed to $+1$ or $-1$.
The point is that a horizontal line crossing through the disk also crosses through the square, and the line segment in which it intersects the disk is mapped to the line segment in which it intersects the square, in the simplest possible way.
This function is continuous at all points where $-1<y<1$, and those are precisely the $y$-values in the disk with those two points deleted.
The inverse is even more easily shown to be continuous.
Postscript: What I said about proving continuity above is certainly true of the mapping $x\mapsto x/\sqrt{1-y^2}$ for each fixed value of $y$.  To show continuity in the two variables separately I'd probably cite a proposition showing that if $f$ and $g$ are continuous functions into $\mathbb R$ then $(f,g)$ is a continuous function into $\mathbb R^2$, and either prove that separately or cite something where it's proved.
It is also necessary to show that the inverse mapping is continuous.  The inverse of
$$
(x,y)\mapsto\left( \frac x {\sqrt{1-y^2}}, y \right) = (w,y)
$$
is
$$
(w,y)\mapsto\left( x \sqrt{1-y^2}, y \right) = (x,y)
$$
and the proof would be the same except for the obvious details.
