Explicit homeomorphism between the plane and the plane minus a closed half-line. Let $r$ be a closed half-line in $\mathbb{R}^2$ and $\delta$ a positive real number. I want to find an explicit homeomorphism $\phi:\mathbb{R}^2\to\mathbb{R}^2-r$ such that $\phi(X)=X$ for all $X$ such that $d(X,r)\geq\delta.$
I can suppose the half-line is $\{(x,y)\in\mathbb{R}^2:x\geq0,y=0\}.$ Moreover, if we put $$B=\{X\in\mathbb{R}^2:d(X,r)<\delta\},$$ we must have $\phi(B)=B-r.$
I don’t know how to write this homeomorphism. I thought I can deform this initial configuration into something other, but I don’t have any other ideas.
 A: Using polar coordinates (r,t) where
{ (r,0) : 0 <= r } is the removed closed ray,
map (r,t) to (r,$\pi$ + t/2). 
A: Let us proceed in various steps.
(1) It clearly suffices to show that for any $a > 0$ there exists a homeomorphism $h_a : \left( [-a,\infty) \times [-a,a] \right) \setminus r \to [-a,\infty) \times [-a,a]$ which is the identity on the boundary $B_a$ of the strip $S_a = [-a,\infty) \times [-a,a]$.
(2) It suffices to consider $a = 1$. Define $g_a : [-1,\infty) \times [-1,1] \to [-a,\infty) \times [-a,a], g_a(x,y) = (ax,ay)$. This is a homeomorphism (its inverse is $g_{1/a}$) such that $g_a(r) = r$ and $g_a(B_1) = B_a$. If we have found $h_1$, then take $h_a = g_a \circ h_1 \circ g_{1/a}$.
(3) Define a map $p: [-1,1] \times [-1,1] \to [-1,1] \times [-1,1]$ as follows. For each $y \in [-1,1]$ let $p_y : [-1,1] \to [-1,1]$ denote the piecewise linear map such that $p_y(-1) = -1$, $p_y(-\lvert y \rvert) = 1 - 2 \lvert y \rvert$, $p_y(1) = 1$. Then define $p(x,y) = (p_y(x),y)$. Explicitly
$$p(x,y) =
\begin{cases}
1 +2 x & -1 \le x \le - \lvert y \rvert \\
1 - 2 \lvert y \rvert + \dfrac{2 \lvert y \rvert}{1 + \lvert y \rvert}(x + \lvert y \rvert) & - \lvert y \rvert \le x \le 1
\end{cases}
$$
It is an easy exercise to verify that $p$ is continuous. Moreover, $p$ is the identity on the boundary $D$ of the square $Q = [-1,1] \times [-1,1]$. It maps $[0,1] \times \{ 0 \}$ to the point $(0,1)$ and restricts to a continuous bijection $p ': Q' \setminus r' \to Q'$, where $Q' = [-1,1) \times [-1,1]$ and $r' = [0,1) \times \{ 0 \}$. Since $Q$ is compact, $p$ is a closed map and therefore a quotient map. Let $U \subset Q' \setminus r'$ be open. Since $Q' \setminus r'$ is open in $Q$, $U$ is open in $Q$. We have $p^{-1}(p(U)) = U$, hence $p(U)$ is open in $Q$. Thus $p'(U) = p(U) = p(U) \cap Q'$ is open in $Q'$ which shows that $p'$ is an open map, i.e. a homeomorphism.
(4) Let us finally construct the homeomorphism $h_1$ as in (2). Define a homeomorphism $\psi : [-1,1) \to [-1,\infty)$ by $\psi(x) = x$ for $x \le 0$ and $\psi(x) = \dfrac{x}{1-x}$ for $x \ge 0$. Then $\psi' = \psi \times id : Q' \to S_1$ is a homeomorphism such that $\psi'(r') = r$. It maps the boundary of $Q'$ onto the boundary of $S_1$ and restricts to a homeomorphism  $\phi: Q' \setminus r' \to S_1 \setminus r$. Now define
$$h_1 = \phi \circ p' \circ \phi^{-1} .$$
