(v, theta, about=np.array((0,0)))
return pt(
        cth * v[0] - sth * v[1] + about[0] - cth * about[0] + sth * about[1],
        sth * v[0] + cth * v[1] + about[1] - sth * about[0] - cth * about[1]
    )
rotate a vector v by angle theta (in radians) about point <about>
rotate a vector v by angle theta (in radians) about point <about>
rotate a vector v by angle theta ( in radians ) about point <about >
def vecrotate(v, theta, about=np.array((0,0))):
    """rotate a vector v by angle theta (in radians) about point <about>"""
    cth = math.cos(theta)
    sth = math.sin(theta)

    return pt(
        cth * v[0] - sth * v[1] + about[0] - cth * about[0] + sth * about[1],
        sth * v[0] + cth * v[1] + about[1] - sth * about[0] - cth * about[1]
    )
def vecrotate ( v , theta , about = np . array ( ( 0 , 0 ) ) ) : cth = math . cos ( theta ) sth = math . sin ( theta ) return pt ( cth * v [ 0 ] - sth * v [ 1 ] + about [ 0 ] - cth * about [ 0 ] + sth * about [ 1 ] , sth * v [ 0 ] + cth * v [ 1 ] + about [ 1 ] - sth * about [ 0 ] - cth * about [ 1 ] )