Karlsruhe metric

The Karlsruhe distance between two points $d_k(p_1,p_2)$ is given as
$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.