diff --git a/surface_generation.nb b/surface_generation.nb index 8b13789..a554d30 100644 --- a/surface_generation.nb +++ b/surface_generation.nb @@ -1 +1,26 @@ +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 the surface shown. As the w varies, the surface deforms along the normals defined by the vector field +gradient f = f_x i + f_y j + f_z k +represented by the arrows. +S1[u_, v_, w_] := + 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_] := + S2[u, v] = + VectorPlot3D[{u*2 x, v*2 y, 2 z}, {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"}, + (*the evaluation will not time out*)SynchronousUpdating -> False, + SaveDefinitions -> True] + + +