Karlsruhe metric

In metric geometry, the Karlsruhe metric is a measure of distance that assumes travel is only possible along rays through the origin and circular arcs centered at the origin. The name alludes to the layout of the city of Karlsruhe, which has radial streets and circular avenues around a central point. This metric is also called Moscow metric.

In this metric, there are two types of shortest paths. One possibility, when the two points are on nearby rays, combines a circular arc through the nearer to the origin of the two points and a segment of a ray through the farther of the two points. Alternatively, for points on rays that are nearly opposite, it is shorter to follow one ray all the way to the origin and then follow the other ray back out. Therefore, the Karlsruhe distance between two points $$d_k(p_1,p_2)$$ is the minimum of the two lengths that would be obtained for these two types of path. That is, it equals $$ d_k(p_1,p_2)= \begin{cases} \min(r_1,r_2) \cdot \delta(p_1,p_2) +|r_1-r_2|,&\text{if } 0\leq \delta(p_1,p_2)\leq 2\\ r_1+r_2,&\text{otherwise} \end{cases} $$ where $$(r_i,\varphi_i)$$ are the polar coordinates of $$p_i$$ and $$\delta(p_1,p_2)=\min(|\varphi_1-\varphi_2|,2\pi-|\varphi_1-\varphi_2|)$$ is the angular distance between the two points.