>>> diamond
RegularPolygon(Point2D(0, 0), 1, 4, 0)
>>> diamond.encloses(Circle((0,0), S.Half))  # circle in diamond
True
>>> diamond.encloses(Circle((0,0), S.One))  # circle circumscribes diamond
False
>>> diamond.encloses(Circle((S.Half, 0), S.One)) # circle intersects on 
right of diamond
False
>>> diamond.encloses(Circle((5, 0), S.One)) # circle outside of diamond
False

(The test of circle point inclusion and poly-ellipse intersection can be 
seen in the entity.py file in the encloses function.
The reverse, ellipse-polygon intersection, was not defined, however, and I 
remedy that in a PR.)

On Monday, April 3, 2017 at 4:53:03 PM UTC-5, Bron Davies wrote:
>
> How can I tell if a circle is wholly inside a polygon?  geometry.
> intersection doesn't work in this scenario
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/69a830ed-642a-4414-9529-e8289e4b8268%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to