You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that these do not seem weird in the sense of having centers that are too close or too small/too big radii.
I tracked down the error to function encloseBasis3, which has the following conditional assignment:
const r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);
For this particular data set, A == 4.440892098500626e-16, and my proposed solution is to test for a 'small enough' A :
const r = -(Math.abs(A) > 1e-10
? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A)
: C / B);
This seems to work in a project which creates quite a few circles, but there is probably a better solution.
The text was updated successfully, but these errors were encountered:
Yes, that looks right to me. encloseBasis3 is generating a circle that doesn’t enclose the three circles (red); the fix you propose looks correct (blue).
And just for completeness, none of the 2-basis will be correct here.
The following set of balls throws an error:
Note that these do not seem weird in the sense of having centers that are too close or too small/too big radii.
I tracked down the error to function
encloseBasis3
, which has the following conditional assignment:For this particular data set,
A == 4.440892098500626e-16
, and my proposed solution is to test for a 'small enough' A :This seems to work in a project which creates quite a few circles, but there is probably a better solution.
The text was updated successfully, but these errors were encountered: