(self, x=0, y=0)
return self.func(*newargs)
Shift the object by adding to the x,y-coordinates the values x and y.

        See Also
        ========

        rotate, scale

        Examples
        ========

        >>> from sympy import RegularPolygon, Point, Polygon
        >>> t = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)
        >>> t
        Triangle(Point(1, 0), Point(-1/2, sqrt(3)/2), Point(-1/2, -sqrt(3)/2))
        >>> t.translate(2)
        Triangle(Point(3, 0), Point(3/2, sqrt(3)/2), Point(3/2, -sqrt(3)/2))
        >>> t.translate(2, 2)
        Triangle(Point(3, 2), Point(3/2, sqrt(3)/2 + 2),
            Point(3/2, -sqrt(3)/2 + 2))
Shift the object by adding to the x,y-coordinates the values x and y.
Shift the object by adding to the x y - coordinates the values x and y .
def translate(self, x=0, y=0):
        """Shift the object by adding to the x,y-coordinates the values x and y.

        See Also
        ========

        rotate, scale

        Examples
        ========

        >>> from sympy import RegularPolygon, Point, Polygon
        >>> t = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)
        >>> t
        Triangle(Point(1, 0), Point(-1/2, sqrt(3)/2), Point(-1/2, -sqrt(3)/2))
        >>> t.translate(2)
        Triangle(Point(3, 0), Point(3/2, sqrt(3)/2), Point(3/2, -sqrt(3)/2))
        >>> t.translate(2, 2)
        Triangle(Point(3, 2), Point(3/2, sqrt(3)/2 + 2),
            Point(3/2, -sqrt(3)/2 + 2))

        """
        newargs = []
        for a in self.args:
            if isinstance(a, GeometryEntity):
                newargs.append(a.translate(x, y))
            else:
                newargs.append(a)
        return self.func(*newargs)
def translate ( self , x = 0 , y = 0 ) : newargs = [ ] for a in self . args : if isinstance ( a , GeometryEntity ) : newargs . append ( a . translate ( x , y ) ) else : newargs . append ( a ) return self . func ( * newargs )