def getSpanVectors(normal, c, d):
    """ getSpanVectors(normal, prevA, prevB) -> (a,b)
    
    Given a normal, return two orthogonal vectors which are both orthogonal
    to the normal. The vectors are calculated so they match as much as possible
    the previous vectors.
    
    """
    a1 = d.cross(normal)
    if a1.norm() < 0.001:
        b1 = c.cross(normal)
        a1 = b1.cross(normal)
    a2 = -1 * a1
    if c.distance(a1) > c.distance(a2):
        a1 = a2
    b1 = a1.cross(normal)
    return a1.normalize(), b1.normalize()
