'Rotate ``angle`` radians counterclockwise about Point ``pt``.
See Also
rotate, scale
Examples
>>> from sympy import Point2D, pi
>>> t = Point2D(1, 0)
>>> t.rotate(pi/2)
Point2D(0, 1)
>>> t.rotate(pi/2, (2, 0))
Point2D(2, -1)'

def rotate(self, angle, pt=None):

    from sympy import cos, sin, Point
    c = cos(angle)
    s = sin(angle)
    rv = self
    if (pt is not None):
        pt = Point(pt, dim=2)
        rv -= pt
    (x, y) = rv.args
    rv = Point(((c * x) - (s * y)), ((s * x) + (c * y)))
    if (pt is not None):
        rv += pt
    return rv
