Demo Tutorial
Text DEMO TUTORIAL
This tutorial is divided into five lessons.
To view a lesson, click on the [+] button above its picture and then click the button that appears.
A more detailed tutorial is located in the resources section.
Demos
Lesson 1: Viewing a 2D Graph
 
This demo includes two windows: a control window (which contains the equation for f(x, y) in this case) and a 2D graph window. You may find it useful to adjust the size of the graph window.
Once you are comfortable with the window size, you can translate or zoom in or out to change your view of the 2D graph.
To translate, select Translate from the Tools menu or hold down Alt. Click and drag in the direction you want to translate the graph.
To zoom, select Zoom from the Tools menu or hold down Shift. Click and drag upward to zoom in or drag downward to zoom out.
When you are finished using the demo, you can exit by closing the control window or by selecting Exit Demo from the Demo menu in the control window.

Lesson 2: Using the Control Window
 
The control window in this demo includes two elements: the interval x and the function f(x).
Each time you change the information in a text box in the control window, you must press Enter for the change to take effect.
For example, suppose you wanted to view the graph from x = 1 to 2 instead of 1 to 1. To do this, you would type in "2" in the text box for the upper bound of x and press Enter.
In this demo, you have the option of changing the bounds on x, the resolution for x, and the expression for the function f(x). (See EXAMPLES at the bottom of this page for a list of some useful builtin functions.)
To save the altered demo (don't worry, this won't overwrite the old one), select Show Applet Tag under Demo in the Control Window. Copy the HTML code that appears, and paste it in your response to a homework assignment or discussion. This will create a button in your response that leads to your version of the demo.

Lesson 3: Variables and Expressions
 
In these demos, an Expression can be assigned a constant or variable value and can then be used in any formula or plot in the demo. The example used here is called "a", and it represents the magnitude of a vertical stretch of the graph. Try changing its value. You can change it to any number or to any expression involving c, the only variable used in this demo.
Variables in these demos, like intervals, are given minimum and maximum values. Instead of having resolution, however, variables have "steps". If you started a variable at its minimum value, the amount of times you would have to press the ">" button to get to the maximum value would be equal to the number of steps for the variable.
Just as the ">" button increases the variable value by one step, the "<" button decreases the value by one step.
To see an animation in which the variable value keeps increasing or keeps decreasing until it reaches its upper or lower bound, use the ">>" or "<<" button.
In this example, the variable c represents the altitude of the green line in the 2D Graph window.

Lesson 4: Adding elements to a demo
 
This demo starts out blank. The lesson explains how to add in the elements you have seen so far.
To add an expression, select Add New Expression from the Controls menu, and enter the expression in the form
name = value (e.g. a = 1).
Once you have done this, click OK (or press enter).
To add an interval, select Add New Interval from the Controls menu. You will be asked to enter the name, minimum value, maximum value, and resolution for an interval, in this form:
name of interval = #, #, #
and click OK.
For example, if you were trying to recreate the previous demo, you would add the interval x by typing "x = 1, 1, 20".
To add a new variable, select Add New Variable from the Controls menu and enter the variable name, minimum and maximum values, and steps, in this form:
variable name = #, #, #
and click OK.
To add a function, select Add New Function from the Controls menu and enter a function in this form:
name of function(independent variable(s)) = expression
click OK when you are finished.
Note that you must use "*" for multiplication and "^" for exponents. For example, for the product 2x, you need to type "2 * x".
To recreate the function from the previous demo, type "f(x) = x^2"
Now under Controls, select New 2D Graph.
Go to Plot >> Add Plot >> Curve
In the box where it asks you to enter a parametric curve, type in expressions for x and y, separated by commas. For example, you could type x, f(x) to get the function graph of f(x).
You can change the color by clicking on the box that starts out with a green bar, clicking "Edit Color", and selecting the desired color of the surface.
To get a demo that starts out blank (making sure to save first if you want to keep your demo), you would select New Demo from the Demo menu in the control window of any existing demo.

Lesson 5: Using Hotspots
 
A hotspot is a movable point on one of the graphs of the demo whose coordinates can be used to affect other parts of the demo.
For example, the point in the window called "Altitude of Line" is a hotspot. It is constrained to lie on the line segment shown. Click and drag the hotspot up and down to change the altitude of the green line in the window called "Function Graph".
The way to use a coordinate of a hotspot as a value in another part of the lab is to type (name of hotspot)_1 for the xcoordinate and (name of hotspot)_2 for the ycoordinate. For example, the hotspot in this demo is called C, and the parametric expression given for the green line is x, C_2.
Adding a hotspot is a bit more involved than adding most other types of elements. To add a hotspot:
 Create the graph window where you want the hotspot to be located.
 Create the plot to which you want to constrain the position of the hotspot. This could be a parametrized curve or surface, for example. To create a simple slider bar, you might enter the parametrized curve (0, k), where k is an interval that goes from 1 to 1.
 Go to Edit Hotspots under the Window menu.
 Click on the Add Hostpot button.
 Enter the name of the hotspot in the first textbox.
 In the second textbox, enter the starting position of the hotspot. Make sure this position is located on your plot.
 In the third box, select "Plot", and then choose the plot to which you want to constrain the hotspot.
 Finally, go to Plot >> Add Plot >> Point and instead of typing in coordinates for the point, just type in the name of the point. The hotspot should appear on the graph.
An alternative way to set constraints for hotspots is to enter an expression for the boundary of the hotspot. "Clamp(lower bound,upper bound)" followed by "{Point_#}" is used to keep a coordinate of a hotspot between two expressions. For example, clamp(0, 1){Point_1},clamp(0, 2){Point_2} would limit a hotspot to a rectangle with 0≤x≤1 and 0≤y≤2.

Exercises 1. Create a new demo by following these steps:
 Add an interval x which goes from 1 to 1 in 20 steps.
 Add a variable a which goes from 1 to 1 in 10 steps.
 Add a function f(x), and type in any expression for it.
 Add a 2D graph window which shows the function graph of f(x) and plots the point (a, f(a)).
2. Create a demo which shows a graph of the function f(x) and also graphs the tangent line to f(x) at some point, x0.
3. Create a demo based on your favorite calculus topic.
