Greetings Everyone,↵
↵
I was doing the maximum enclosing circle problem, This is the subproblem of that.↵
↵
_Given two ends points of a common chord of two circles of equal radius say **R** find out the coordinates of two centers of the circles (without much precision loss preferably)_↵
↵
The condition can be pictorially represented like.↵
↵
![ ](http://codeforces.me/predownloaded/4f/2f/4f2f9c9f8762f414ff4a7707af51ec13ed9ea9a1.png) ↵
↵
A possible solution might be to find the coordinates of mid point of $A$ and $B$ that is $M$ which is $( \frac{x1+x2}{2} , \frac{y1+y2}{2} )$↵
↵
Since the slope of line joining $A$ and $B$ is $ \frac{y2-y1}{x2-x1} $ and since the line joining the centers would be perpendicular to the slope of line joining $C1$ and $C2$ would be $ \frac{x1-x2}{y2-y1} $.↵
↵
The distance between the points $M$ and $C1$ or $C2$ can be found using pythagoras theorem i.e. $\sqrt{R^{2}-\frac{d^2}{4}}$ where $d = \sqrt{(x2-x1)^2+(y2-y1)^2}$↵
↵
Now since we know the slope of the line and a point on it and distance between the points we can now find the coordinates of centers, but It's highly insensitive to precision.↵
↵
Any other method, resource , links etc would be deeply appreciated.↵
↵
Thanks in advance.
↵
I was doing the maximum enclosing circle problem, This is the subproblem of that.↵
↵
_Given two ends points of a common chord of two circles of equal radius say **R** find out the coordinates of two centers of the circles (without much precision loss preferably)_↵
↵
The condition can be pictorially represented like.↵
↵
![ ](http://codeforces.me/predownloaded/4f/2f/4f2f9c9f8762f414ff4a7707af51ec13ed9ea9a1.png) ↵
↵
A possible solution might be to find the coordinates of mid point of $A$ and $B$ that is $M$ which is $( \frac{x1+x2}{2} , \frac{y1+y2}{2} )$↵
↵
Since the slope of line joining $A$ and $B$ is $ \frac{y2-y1}{x2-x1} $ and since the line joining the centers would be perpendicular to the slope of line joining $C1$ and $C2$ would be $ \frac{x1-x2}{y2-y1} $.↵
↵
The distance between the points $M$ and $C1$ or $C2$ can be found using pythagoras theorem i.e. $\sqrt{R^{2}-\frac{d^2}{4}}$ where $d = \sqrt{(x2-x1)^2+(y2-y1)^2}$↵
↵
Now since we know the slope of the line and a point on it and distance between the points we can now find the coordinates of centers, but It's highly insensitive to precision.↵
↵
Any other method, resource , links etc would be deeply appreciated.↵
↵
Thanks in advance.