Now that you have a surface, lets make it more interactive. Suppose you are interested in the family of surfaces
f(x,y) = x3 - ax - y2 for various values of a. We can make a slider for the value of a so that changing the slider changes the surface. To do this, edit the function to beFunction {x y} { let z = x^3 - a x - y^2 }and below this add the lineSlider a -1 1 0This declares a slider tied to the variableawhose values run from -1 to 1 and is set initially to 0. When you hit theUpdatebutton, the slider will appear in its own window. First, move this to a convenient location, then change the value of the slider by dragging it; when you let go, the surface should be updated to reflect the new value ofa.1Note that the values of sliders can be used almost anywhere. For instance, you can change the domain to
Domain {{-1 1 n} {-1 1 n}} Slider n 1 20 10 -resolution 1in order to have the number of subdivisions be controlled by a slider. Here, the resolution of the slider is set to 1 so that it will take on only integer values.
| 1 |
|
|
|