The general form of a bivariate polynomial of total degree is given by:
For example, the general form for a bivariate quadratic is:
Next, we choose the order of the bivariate polynomial which we will fit to the points. Increasing this value will refine the fit.