GraphingCalculator 4; Window 45 0 865 1355; PaneDivider 355; SignificantDigits 3; FontSizes 18; BackgroundType 0; StackPanes 1; U -0.5 0.5; V -0.5 0.5; 3D.View -0.5717970503756279 0.7062112071481199 0.4175091188507191 -0.5546332885907965 -0.7077559616136073 0.4375653256723404 0.6045081046703116 0.0186341069590012 0.7963810153997305; 3D.Speed 0; Text "Gradient as normal vector."; Color 7; Expr function(f,x,y)=s*cos(x)*cos(y); Color 5; MathPaneSlider 51; Expr a=slider([-2,2]); Color 6; MathPaneSlider 109; Expr b=slider([-2,2]); Color 3; MathPaneSlider 109; Expr s=slider([1,10]); Text "Adjusting the sliders moves the normal vector."; Color 4; Expr function(g,x,y)=function(oppartial(x),function(f,x,y)),function(h,x,y)=function(oppartial(y),function(f,x,y)); Color 6; Expr z=function(f,x,y); Text "The trick here is we are plotting the normal to surfaces of constant g(x,y,z)=z-f(x,y) (=0, as plotted.) Thus we plot grad g."; MathPaneSlider 88; Expr m=slider([0,0.1]); Color 2; Expr vector(a,b,function(f,a,b)),vector(a,b,function(f,a,b))+vector(-function(g,a,b),-function(h,a,b),1),'radius'=m;