Did I find the right examples for you? yes no

# sympy.geometry.Polygon

All Samples(38)  |  Call(35)  |  Derive(0)  |  Import(3)
```A simple polygon in space. Can be constructed from a sequence or list
of points.

Notes:
======
- Polygons are treated as closed paths rather than 2D areas so
some calculations can be be negative or positive (e.g., area)
based on the orientation of the points.
```

```from sympy import (Abs, C, Dummy, Rational, Float, S, Symbol, cos, oo, pi,
simplify, sin, sqrt, symbols, tan)
from sympy.geometry import (Circle, Curve, Ellipse, GeometryError, Line, Point,
Polygon, Ray, RegularPolygon, Segment, Triangle,
are_similar, convex_hull, intersection, centroid)
```
```    assert e1.encloses(e1) is False
assert e1.encloses(
Polygon(Point(-0.5, -0.5), Point(-0.5, 0.5), Point(0.5, 0.5))) is True
assert e1.encloses(RegularPolygon(p1, 0.5, 3)) is True
assert e1.encloses(RegularPolygon(p1, 5, 3)) is False
```
```    assert c1.is_tangent(Ellipse(Point(2, 0), 1, 1)) is True
assert c1.is_tangent(
Polygon(Point(1, 1), Point(1, -1), Point(2, 0))) is True
assert c1.is_tangent(
Polygon(Point(1, 1), Point(1, 0), Point(2, 0))) is False
```
```def test_polygon():
t = Triangle(Point(0, 0), Point(2, 0), Point(3, 3))
assert Polygon(Point(0, 0), Point(1, 0), Point(2, 0), Point(3, 3)) == t
assert Polygon(Point(1, 0), Point(2, 0), Point(3, 3), Point(0, 0)) == t
assert Polygon(Point(2, 0), Point(3, 3), Point(0, 0), Point(1, 0)) == t
```

```from sympy import Symbol, Rational, sqrt, pi, cos, oo, simplify, Real, raises
from sympy.geometry import Point, Polygon, convex_hull, Segment, \
RegularPolygon, Circle, Ellipse, GeometryError, Line, intersection, \
Ray, Triangle, are_similar, Curve

```
```def test_polygon():
p1 = Polygon(
Point(0, 0), Point(3,-1),
Point(6, 0), Point(4, 5),
Point(2, 3), Point(0, 3))
p2 = Polygon(
Point(6, 0), Point(3,-1),
```
```        Point(2, 3), Point(4, 5))
p3 = Polygon(
Point(0, 0), Point(3, 0),
Point(5, 2), Point(4, 4))
p4 = Polygon(
Point(0, 0), Point(4, 4),
```

```    """