def bilinear_interp(x, y, v11, v12, v21, v22):
    """
    Args:
        x, y: 0 to 1 
        v11, v12, v21, v22: four points
    """
    return (v11 * (1 - y) + v12 * y) * (1 - x) + (v21 * (1 - y) + v22 * y) * x