Viewpoint:  function and partials, viewed from a common viewpoint
MAT329
Andy Long, Fall, 2015

(* Here is a nice smooth separable function: *)
f[x_,y_]:=Sin[x]y^2;
{xmin,xmax,ymin,ymax,zmin,zmax}={-3,3,-3,3,-10,10};
(* This one has a continuity problem at the origin: *)
f[x_,y_]:=x y /(x^2+y^2)
{xmin,xmax,ymin,ymax,zmin,zmax}={-1,1,-1,1,-1.5,1.5}

(* We compute the partials: *)
fx[x_,y_]=D[f[x,y],x];
fy[x_,y_]=D[f[x,y],y];

(* Now we'll plot them from the same viewpoint: *)
Manipulate[
{
Plot3D[f[x,y],{x,xmin,xmax},{y,ymin, ymax},ViewPoint->{a,b,c}],
Plot3D[fx[x,y],{x,xmin,xmax},{y,ymin, ymax},AxesLabel->Automatic,ViewPoint->{a,b,c}],
Plot3D[fy[x,y],{x,xmin,xmax},{y,ymin, ymax},AxesLabel->Automatic,ViewPoint->{a,b,c}]
}
,{{a,1,"a"},-2, 2} 
,{{b,1,"b"},-2, 2} 
,{{c,1,"c"},-2, 2} 
]