Applet: Directional derivative on a mountain shown as level curves

The height of a mountain ranged described by a function $f(x,y)$ is shown as a level curve plot. A point $\vc{a}$ (in dark red) can be moved with the mouse. The height $f(\vc{a})$ is shown on the bottom cyan slider labeled by “f”. The direction vector $\vc{u}$ (the light green vector) points at an angle $\theta$ from east, which can be changed by dragging the red point on the top slider. The value of the directional derivative $D_{\vc{u}}f(\vc{a})$ is shown by the middle (light green) slider labeled by “Duf”.
If you set $\vc{u}$ to point straight east ($\theta=0$ in the applet), then $\vc{u}$ points in the positive $x$ direction ($\vc{u}=(1,0)$) so that $\displaystyle D_{\vc{u}}f(\vc{a}) = \pdiff{f}{x}(\vc{a})$. Similarly, when $\vc{u}$ points straight north ($\theta=\pi/2$), then $\vc{u}$ points in the positive $y$ direction ($\vc{u}=(0,1)$) so that $\displaystyle D_{\vc{u}}f(\vc{a}) = \pdiff{f}{y}(\vc{a})$.
f you make $\vc{u}$ point in a direction parallel to the level curve, what happens to $D_{\vc{u}} f(\vc{a})$? (Since the height is constant along a level curve, you should be able to infer what the slope in that direction should be.) What happens to $D_{\vc{u}}f(\vc{a})$ when you turn $\vc{u}$ to point in the opposite direction (i.e., add or subtract $\pi$ from $\theta$)?
Applet file: mountcondirect.m
General information about LiveGraphics3D applets
This applet was created using LiveGraphics3D. To manipulate it, you can
- click and drag to rotate in any direction,
- shift + click and drag up/down to zoom out/in,
- shift + click and drag left/right to rotate around an axis coming out of the screen, and
- press Home to reset to the original view.
Most of the LiveGraphics3D applets have parameters that you can change. In general, you can click and drag points or balls around to change the parameters.
Since these applets use Java, you must have Java installed and properly configured in your browser for the them to display. You can get Java here. If you have trouble getting them to display in your browser, you can visit the LiveGraphics3D troubleshooting page for information on how to get the Java applets to work.
On occasion, even when Java is configured correctly, the Java applets don't load the first time and one instead sees an error message. You can wait a few moments to see if the applet will eventually load itself anyway. You can also reload the page to see if the applet will properly load. Sometimes, one needs to do this multiple times.
