A mapping that converts a line segment to an arc

analytic geometrycomputational geometrygeometry

I'm looking for a mapping $f:\mathbb{R}^2\to\mathbb{R}^2$ that converts a line segment $AA'$ with two end points $A=(x_A,y_A)$ and $A=(x_{A'},y_{A'})$ to an arc $BB'$ with radius $r$ centered at $O$, with end points $B=(x_B,y_B)$ and $B'=(x_{B'},y_{B'})$.

line segment to circular arc

This mapping should map $A$ to $B$ and $A'$ to $B'$. Does anyone know a closed-form relation for such mapping?

I know that mappings such as $w=1/z$ in complex plain can convert lines to circles. But I don't know how to modify this to convert a particular line segment to an arc given the endpoints and radius.

Best Answer

Treat everything as complex numbers, let $P$ be a point on the line segment $AA'$. The map $$P \mapsto \frac{1}{A'-A}\left( P - \frac{A+A'}{2}\right)$$ sends the line segment $AA'$ to the line segment joining $-\frac12$ to $\frac12$. Multiply $B'-B$ will rotate and scale the line segment to a parallel copy of $BB'$. After another translation, the map

$$P \mapsto P' \stackrel{def}{=} \frac{B+B'}{2} + \frac{B'-B}{A'-A}\left( P - \frac{A+A'}{2}\right)$$ sends line segment $AA'$ to line segment $BB'$.

To send line segment $BB'$ to an arc joining them, you first figure out the mid point $M$ of the circular arc $BB'$ and let $N = 2O - M$ be the antipodal point of $M$ on the circle holding the arc. $$N = O - \frac{2r}{\sqrt{4r^2 - |B-B'|^2}} \left(\frac{B+B'}{2} - O\right)$$

If you perform a circle inversion with respect to $N$ and radius $R = |B - N| = |B'-N|$, the point $P'$ will get mapped to a point $P''$ on the circular arc joining $BB'$.

$$P' \mapsto P'' \stackrel{def}{=} N + \frac{R^2}{\bar{P}' - \bar{N}}$$ Please note that in denominator of above expression, you need to take complex conjugation for $P'$ and $N$.