(a, b, weight=0.5)
Note that weight is a fraction of the distance between self and other.
    So... 0.33 is a point .33 of the way between self and other.
Note that weight is a fraction of the distance between self and other.
    So... 0.33 is a point .33 of the way between self and other.
Note that weight is a fraction of the distance between self and other . So ... 0 . 33 is a point . 33 of the way between self and other .
def affine_combination(a, b, weight=0.5):
    """
    Note that weight is a fraction of the distance between self and other.
    So... 0.33 is a point .33 of the way between self and other.
    """
    if hasattr(a, 'z'):
        return Point3((1 - weight) * a.x + weight * b.x,
                      (1 - weight) * a.y + weight * b.y,
                      (1 - weight) * a.z + weight * b.z,
                      )
    else:
        return Point2((1 - weight) * a.x + weight * b.x,
                      (1 - weight) * a.y + weight * b.y,
                      )
def affine_combination ( a , b , weight = 0.5 ) : if hasattr ( a , 'z' ) : return Point3 ( ( 1 - weight ) * a . x + weight * b . x , ( 1 - weight ) * a . y + weight * b . y , ( 1 - weight ) * a . z + weight * b . z , ) else : return Point2 ( ( 1 - weight ) * a . x + weight * b . x , ( 1 - weight ) * a . y + weight * b . y , )