How a question is presented, including test data/geometry, determines the nature of the answer.
If you had presented a jumbled list of points and circles, such as the Jitter output below, I would have answered it differently:
(16.7 KB) (DEPRECATED due to error, use version ‘b’ below)
That code is written with the intent of handling an arbitrary number of circles with differing numbers of points in each one. But it contains an error that I didn’t notice until I built a proper “test jig”, below:
If I had an hour to solve a problem and my life depended on the solution, I would spend the first 55 minutes determining the proper question to ask, for once I know the proper question, I could solve the problem in less than five minutes.
– Albert Einstein