Surfaces and Gradients

S1[u_,v_,w_]:=ContourPlot3D[ u*x^2+v*y^2+z^2==w,{x,-3,3},{y,-3,3},{z,-3,3},Boxed->False,Axes->False]

S2[u_,v_]:=VectorPlot3D[{u*2x,v*2y,2z},{x,-3,3},{y,-3,3},{z,-3,3},Boxed->False,Axes->False]

Manipulate[
Show[{S1[u,v,w],S2[u,v]},ImageSize->{400,400}],
{u,-3,3,Appearance->"Labeled"},
{v,-3,3,Appearance->"Labeled"},
{w,0,2,Appearance->"Labeled"},
SynchronousUpdating->False,
SaveDefinitions->True]

Caption

Visualize how gradients relate to surfaces.

The points (x,y,z) satisfying w=f(x,y,z)=u (x^2)+ v (y^2) + (z^2) for a particular value of w form the surface shown. As w varies, the surface deforms along the normals defined by the vector field ∇f=((∂f)/(∂x))(Overscript[i, ->])+((∂f)/(∂y)) (Overscript[j, ->])+((∂f)/(∂z))(Overscript[k, ->]), the gradient of f, represented by the arrows.

Due to the complex nature of this Demonstration, there may be a delay between changing the variables and updating the graph.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Surfaces and Gradients" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/SurfacesAndGradients/

Contributed by: Nevin Raj

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »