Mathematical Principles for Scientific Computing and Visualization  
http://www.farinhansford.com/books/scv
by Gerald Farin and Dianne Hansford

This notebook demonstrates the plotting of a bilinear function.
Here we define the bilinear function by specifying z-values at (0,0), (0,1), (1,0), (1,1).

Because the given four points do not lie in a plane, the resulting bilinear surface is not a plane. Examine the curve on the function that follows one of the corner-to-corner diagonals. Obviously it is not linear; what degree is it?

Figure 11.6 was created with this notebook.

See Chapter 11: Computing with Multivariate Functionsfor details.

Updated May 2008

(* Set output folder to folder this files lives in *)

SetDirectory[ToFileName[Extract["FileName"/.NotebookInformation[EvaluationNotebook[]],{1},FrontEnd`FileName]]];


(* Choose the z-values at the four corners of the rectangular region of this bilinear function *)
(* z00 corresponds to x=0, y=0. Others follow similarly *)
z00=1;
z01=-1;
z10=-2;
z11=1;

(* Define the bilinear function *)
(* See equation 11.6 for details *)
f[z00_,z01_,z10_,z11_,x_,y_]:=(1-x)*(1-y)*z00 +(1-x)*y*z01+ x*(1-y)*z10+ x*y*z11;

(* Create a plot of the function *)
pic=Plot3D[f[z00,z01,z10,z11,x,y],{x,0,1},{y,0,1}, ViewPoint->{0.7,-1,0.7}, Axes->False]

(* Output the plot to a postscript file *)
Export["bilinex.eps",pic]