def build_line_func(x1, y1, x2, y2):
    """build a function that parameterizes a line"""
    def line_func(t):
        """helper"""
        return x1 + (x2 - x1) * t, y1 + (y2 - y1) * t
    return line_func