> #sfb tanplane.mws 6 feb 03 > # > with(plots):with(plottools); > f:=x^2+y^2;#f:=sin(x)*sin(y);f:=exp(-x^2-y^2); > fstring:=convert(f,string);ftitle:="The good doctor's "||fstring; > a:=0.3; > b:=0.5; > c:=eval(f,{x=a,y=b}); > L:=1; > A:=plot3d(f,x=a-L..a+L,y=b-L..b+L,style=patchcontour,contours=[seq(c-L+i*L/5,i=1..9)],axes=boxed,view=[a-L..a+L,b-L..b+L,c-L..c+L],title=ftitle):A; > P:=sphere([a,b,c],L/50,color=black): > display(A,P); > fx:=diff(f,x);fy:=diff(f,y); > fxP:=eval(fx,{x=a,y=b});fyP:=eval(fy,{x=a,y=b}); > ftanP:=fxP*(x-a)+fyP*(y-b)+c; > T:=plot3d(ftanP,x=a-L..a+L,y=b-L..b+L,style=patchcontour,contours=[seq(c-L+i*L/5,i=1..9)],axes=boxed,view=[a-L..a+L,b-L..b+L,c-L..c+L],shading=zhue): > display(A,P,T); >