def line2d(x, y, coeffs=[1]*3, return_coeff=False):
    """Returns the result of a 2D quadratic, or returns the coefficients"""
    a0 = (x*0+1)*coeffs[0]
    a1 = x*coeffs[1]
    a2 = y*coeffs[2]
    if return_coeff:
        return a0, a1, a2
    else:
        return a0+a1+a2