I have the following geometry problem: You are given a circle with a center of origin - C (0, 0) and a radius of 1. Inside the circle, there are N points that represent centers from N different circles. You will be asked to find the minimum radius of the small circles (the radius of all circles is equal) to cover the entire border of the large circle.
The number of circles: 3 β€ N β€ 10000, and the problem should be solved up to ten-digit numbers, where 1 β€ P β€ 6.
For instance:
N = 3 and P = 4
and coordinates:
(0.193, 0.722)
(-0.158, -0.438)
(-0.068, 0.00)
The radius of small circles is 1.0686.
I have the following idea, but my problem is its implementation. The idea is a binary search to find the radius and for each value given by the binary search, to try to find the entire intersection point between the small circles and the large one. Each intersection will have an arc. The next step is to βprojectβ the coordinates of the arcs on the X axis and Y axis, resulting in several intervals. If the reunions of the intervals from the X and Y axis result in the interval [-1, 1] on each axis, this means that the whole circle is covered.
To avoid accuracy issues, I was thinking about searching between 0 and 2 & times; 10 P and also taking the radius as 10 P , thereby excluding the numbers after the comma, but my problem is how to simulate the intersection of circles, and then how to see, reconnecting the resulting intervals is the interval [-1, 1].
Any suggestions are welcome!
source share