def random_vector_2D(vector, sd):
    """Form random orthonormal basis including vector, rotate vector by random
    amount sd in both normal directions."""
    import random
    o0 = vector.ortho()
    o1 = vector.cross(o0)
    return vector.rotate(o0, random.gauss(0, sd)).rotate(o1, random.gauss(0,
        sd))
