return all possible solutions
Opened this issue · 0 comments
Currently apollonius.solve
returns only one circle or null
. Often there are additional solutions that fulfill the same tangency requirements. For example, consider three circles of radius 2, 1, and 2, placed on a line in this order. In this configuration, an externally tangent circle can be found on both sides of the line.
We could obtain these additional solutions by considering both signs of square roots whenever they occur in the code. However then the return value of the function would need to be an array of varying length.
Maybe in future we could have special function for this. Possible names are for example solveMany
or solveAll
or findAll
. The name must somehow be distinguishable from solving all the tangency configurations at the same time, however.