'The perimeter of the polygon.
Returns
perimeter : number or Basic instance
See Also
sympy.geometry.line.Segment.length
Examples
>>> from sympy import Point, Polygon
>>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])
>>> poly = Polygon(p1, p2, p3, p4)
>>> poly.perimeter
sqrt(17) + 7'

@property
def perimeter(self):

    p = 0
    args = self.vertices
    for i in range(len(args)):
        p += args[(i - 1)].distance(args[i])
    return simplify(p)
