Let’s plot that polygon by interpreting it in Shapely and using its draw behavior.

poly=sgeom.Polygon(points)poly

Nifty. Now, I’ve implemented Skyum’s method for finding the Minimum Bounding Circle for a set of points in centrography.

Right now, there’s some extra printing. Essentially, if you have sufficiently straight lines on the boundary, the equations for the circumcenter of the tuple $(p,q,r)$ explodes. Thus, I test if $\angle (p,q,r)$ identifies a circle whose diameter is $(p,r)$ or $(p,q)$. There are two triplets of straight enough lines, so their circle equations are modified, and I retain printing for bug diagnostics.

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True

<Figure size 432x288 with 0 Axes>

Point 0: False
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: False
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True

<Figure size 432x288 with 0 Axes>

Point 0: False
Point 1: False
Point 2: False
Point 3: False
Point 4: False
Point 5: False
Point 6: True
Point 7: False
Point 8: False

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: False
Point 9: False
Point 10: False
Point 11: True
Point 12: True
Point 13: True
Point 14: True
Point 15: True
Point 16: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True
Point 10: True
Point 11: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True
Point 10: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: False
Point 1: True
Point 2: True
Point 3: True
Point 4: False

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True
Point 6: True
Point 7: True
Point 8: True
Point 9: True

<Figure size 432x288 with 0 Axes>

Point 0: True
Point 1: True
Point 2: True
Point 3: True
Point 4: True
Point 5: True