Skip to content

Update surface_generation.nb #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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]