Polar to cartesian transformation

It was a bit tricky to derive the transformation demonstrated in the animation.

Let us start from a point $(x, y)$ of $y = f(x)$. There are two major transformations:

  1. $T_1: \mathbb{R} \times \mathbb{R}_+ \to \mathbb{R}^2 $, $ (a,b) = T_1(x,y)$. Reflection with respect to $y = x$. Therefore, $T_1(x,y) = (y,x)$.
  2. $T_2: \mathbb{R}_+ \times \mathbb{R} \to \mathbb{R}^2 $, $ (p,q) = T_2 (a,b)$. Transformation into polar coordinates by wrapping one axis around itself and collapsing it to a point as Wikipedia described. We want to have $(y\cos x, y\sin x) = (T_2 \circ T_1)(x,y)$.

enter image description here

Let us derive the second transformation in the animation. Let $R > 0$ and consider the circle centered at $(-R, 0)$ with the radius $R+a$. Then, the circle intersects the $x$-axis at $(a, 0)$. Draw a concentric circle with the radius $R+1$. Draw a line segment between $(-R, 0)$ and $(a, 0)$ and rotate it taking $(-R, 0)$ as a pivot, CCW if $b\ge 0$ and CW if $b < 0$, such that the arclength $AB$ equals $|b|$. Therefore, the angle $\theta$ in the figure is $b/(R+1)$. Let $r = (R+a)$. Then, the new coordinate is obtained by $$ \begin{aligned} (p,q) &= (r\cos \theta - R,~r\cos \theta)\\ &= \left((R+a)\cos\dfrac{b}{R+1} -R,~ (R+a)\sin\dfrac{b}{R+1}\right)\\ &= :U_R(a,b) \end{aligned} $$ $T_2$ can be thought of as the limit of $U$: $$ T_2 = \lim_{R \searrow 0} U_R $$ which follows from the definition of $U$. This is just one of the possible instances of $U$.

Note that $\lim_{R \to \infty}U_R$ is an identity map.

For all $(a,b) \in \mathbb{R}_+ \times \mathbb{R}$, $$ \lim_{R \searrow 0} U_R(a,b) = (a \cos b, a \sin b) $$

Comparing the result with the desired one $(y\cos x, y \sin x)$, we know that $T_1$ is indeed needed.

You can think of the circle with the radius $R$ as a bent axis, which collapses to a point (circle degenerates to a point at the origin) as $R \searrow 0$.

The animation shows the result of changing the values of $R$.

enter image description here