$$INPUT \rightarrow P_1(x_1, y_1), P_2(x_2,y_2), r$$ ![How it works][1] $$d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$$ $$h=\sqrt{r^2-(\frac{d}2)^2}$$ $$\alpha=arcsin(\frac{y_1-y_2}{d})$$ $$x_c=\frac{x_1+x_2}2+h sin(\alpha)$$ $$y_c=\frac{y_1+y_2}2+h cos(\alpha)$$ [1]: https://i.sstatic.net/njvuM.png