(self)
return Point(simplify(A*cx), simplify(A*cy))
The centroid of the polygon.

        Returns
        =======

        centroid : Point

        See Also
        ========

        sympy.geometry.point.Point, sympy.geometry.util.centroid

        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.centroid
        Point(31/18, 11/18)
The centroid of the polygon.
The centroid of the polygon .
def centroid(self):
        """The centroid of the polygon.

        Returns
        =======

        centroid : Point

        See Also
        ========

        sympy.geometry.point.Point, sympy.geometry.util.centroid

        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.centroid
        Point(31/18, 11/18)

        """
        A = 1/(6*self.area)
        cx, cy = 0, 0
        args = self.args
        for i in xrange(len(args)):
            x1, y1 = args[i - 1].args
            x2, y2 = args[i].args
            v = x1*y2 - x2*y1
            cx += v*(x1 + x2)
            cy += v*(y1 + y2)
        return Point(simplify(A*cx), simplify(A*cy))
def centroid ( self ) : A = 1 / ( 6 * self . area ) cx , cy = 0 , 0 args = self . args for i in xrange ( len ( args ) ) : x1 , y1 = args [ i - 1 ] . args x2 , y2 = args [ i ] . args v = x1 * y2 - x2 * y1 cx += v * ( x1 + x2 ) cy += v * ( y1 + y2 ) return Point ( simplify ( A * cx ) , simplify ( A * cy ) )