Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions surface_generation.nb
Original file line number Diff line number Diff line change
@@ -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]