How to build a function to "unsquash" a projection of one circle onto an axis. Consider a function $f$ that takes an angle $\alpha$ in radians and $f(\alpha)$ computes the $2D$ coordinates that describe the shape of a circle. The function is defined on the interval $[0, 2\pi]$

Suppose I evaluate this function at several points in the $[0, 2\pi]$ interval, I could get something similar to the $x$'s in the figure, i.e. points along the circle.
Now if I take these points, and project them onto the $x$(or $y$)-axis, you could see that the density of the points is much larger along the edges $[B]$, than in the center $[A]$. This is expected, for obvious reasons.
I am looking for a function that takes the angle $\alpha$ from $[0, 2\pi]$ and transforms it in such way that for each $\alpha$ I can compute a $\beta$ (also from $[0, 2\pi])$, with the property that when I draw my circle with these new $\beta$ angles $f(β)$, the points will be uniformly distributed when they get projected onto the $x$(or $y$)-axis.
 A: As I'm sure you know, if we let $x = r\cos(\alpha),$ $y = r\sin(\alpha)$ then as $\alpha$ increases from $0$ to $2\pi$ the coordinates $(x,y)$ cover all points along the circumference of a circle of radius $r.$
Moreover, if we suppose the density of $\alpha$ is uniform on $[0,2\pi]$ then the density of the points $(x,y)$ is uniform on the circle.
But as you observed, the density of $x$ values is not uniform along the interval $[-r,r].$
In fact, the density is inversely proportional to the absolute value of the rate at which $x$ changes, that is, the density is
$$  \frac2{\left\lvert\frac{dx}{d\alpha}\right\rvert} 
= \frac2{r\lvert\sin(\alpha)\rvert} = \frac2{r\sqrt{r^2 - x^2}}. $$
The factor of $2$ comes in because you project both the top and bottom semicircle onto the $x$ axis, but regardless of the constant factors, the shape of the density function is something proportional to the graph below,
which shows the density for $r = 1$.

The density is unlimited as you approach $-1$ or $1,$ and the graph of the function is asymptotic to the vertical lines $x=-1$ and $x = 1.$
Of course if you only sample a finite number of points at regular intervals you cannot observe the unbounded nature of the density; but if you keep increasing the number of steps and make appropriate histograms of the results, you should see this pattern emerge.
We can make the density function uniform if we find an increasing function $f$
such that $x = r\cos(f(\alpha))$ decreases uniformly from $r$ to $-r$ as $\alpha$ increases uniformly from $0$ to $\pi$ and
$x = r\cos(f(\alpha))$ increases uniformly from $-r$ to $r$ as $\alpha$ increases uniformly from $\pi$ to $2\pi.$
There are other ways to get a uniform density but they involve sampling points along the circle in some sequence other than one that starts at the rightmost point and proceeds counterclockwise around the circle until you reach the starting point again.
Such a function $f$ looks like this:

Because of the unbounded density of points near $\alpha = 0,$ $\alpha = \pi,$
and $\alpha = 2\pi$ if you take your points uniformly around the circle,
the function needs to get past those places on the circle very quickly;
in fact, the tangent line to its graph needs to go momentarily vertical as $\alpha$ passes through those values.
This function is related to the arc cosine, though as you know, the arc cosine itself is unsuitable: it is a decreasing function, it does not start at $0,$ and it only covers half of the angles around a circle. But we can reflect, scale, translate, and copy the arc cosine function in order to define $f$:
$$ f(\alpha) = \begin{cases}
 \arccos\left(1-\frac2\pi \alpha\right) & 0 \leq \alpha \leq \pi, \\
 \pi + \arccos\left(3-\frac2\pi \alpha\right) & \pi < \alpha \leq 2\pi. \\
\end{cases}.$$
The plot of $x = r \cos(f(\alpha))$ for $0 \leq \alpha \leq 2\pi$ looks like the graph below if $r = 1$ and if we plot $\alpha$ on the horizontal axis and $x$ on the vertical axis.

As desired, it goes uniformly down from $1$ to $-1$ as $\alpha$ increases from $0$ to $\pi$ and increases uniformly from $-1$ to $1$ as $\alpha$ increases from $\pi$ to $2\pi.$
A: The $f$ you are talking about is $\cos(\alpha)$, we can see that Let $\beta(\alpha)=\arccos(\frac{\alpha}{\pi})$. this means that $f(\beta(\alpha))=\cos(\arccos(\frac{\alpha}{\pi}))=\alpha$, meaning that the points will be evenly spaced as desired.
