Bivariate polynomial to Bezier surface Please, does anyone know how to obtain the coordinates of control points of cubic Bezier surface for the following cubic bivariate polynomial:
$$p(x, y) = ax^3 + by^3 + cx^2 + dy^2 + ex + fy + g$$
 A: The Bézier patch can be written as
$$
\left[\begin{matrix}
(1-x)^3  &  3x(1-x)^2  &  3x^2(1-x)  &  x^3
\end{matrix}\right]
\left[\begin{matrix}
z_{00} & z_{01} & z_{02} & z_{03} \\
z_{10} & z_{11} & z_{12} & z_{13} \\
z_{20} & z_{21} & z_{22} & z_{23} \\
z_{30} & z_{31} & z_{32} & z_{33} \end{matrix}\right]
\left[\begin{matrix}
(1-y)^3  \\  3y(1-y)^2  \\  3y^2(1-y)  \\  y^3
\end{matrix}\right]
$$
We need to choose the $z_{ij}$ so that this will be identically equal to 
$$
ax^3 + by^3 + cx^2 + dy^2 + ex + fy + g
$$
In effect, this is just a change-of-basis problem in the vector space of polynomials of degree $3 \times 3$: we have the coefficients in the power basis (aka Taylor basis or monomial basis), and we want to find the coefficients in the Bernstein basis. There are a couple of possible approaches (at least). 
Firstly, you could just work out the coefficients $x^3$, $y^3$, $x^2$, $y^2$, etc. in the Bézier patch equation, and equate these to the corresponding coefficients $a$, $b$, $c$, $d$, etc. This will give a linear system of equations that you can solve to get the $z_{ij}$.
Another approach is to just substitute 16 different values for $(x,y)$, which will give you 16 linear equations that you can solve to get the $z_{ij}$. For example, if you substitute $(x,y) = (0,0)$, you immediately get $z_{00} =g$. Similarly, substituting $(x,y) = (1,1)$, gives $z_{33} =a+b+c+d+e+f+g$.
