Plotting Applet
The purpose of this applet is to plot functions. It can plot up
to 10 different functions at the same time. It can also be used to solve equations
numerically. Here is a brief description of how to use this applets and what its features are.
- The Viewing Window Parameters area is used to set the area of the
graph the user wishes to see. Use it as follows:
- Specify the desired values for XMin, XMax,
YMin, YMax. The applet
will do basic error checking. The user can enter a number or any expression which can be evaluated as a number. Scientific notation is allowed (as in 2.1E3). When plotting trigonometric functions, the range can be specified as multiples of pi. For example 2*pi can be entered (the system recognizes pi as the number we all know 3.14159...). Any entry which once evaluated doe not produce a number will result
in an error being displayed in the Messages area, and the focus will remain in the field
which caused the error, until the error is fixed.
- When Use y-range is checked, the supplied values for the y-range
will be used Otherwise, the applet will find YMin and YMax from the supplied
functions.
- Any change in this area will cause the Plot Area to be updated immediately.
- The Function Information area is where the functions to be plotted
are entered. Use this area as follows:
- To enter a new function, always press the New Function button.
Then, enter the expression defining the function. The syntax is similar
to the syntax used in the Java Math Engine. For example, to define the
sine function, you would type in sin(x). Make
sure you use x for the variable in your definition.
This field supports the syntax of the Java Math Engine. This site provides
further
help on the syntax the Java Math Engine understand.
- A maximum of 10 functions can be defined at the same time.
- Checking Active means the function will show on the graph. Unselecting
it means the function will not show.
- Use the + and - buttons to scroll through the list of defined functions.
- Each defined function has a different color assigned to it. The selection
is automatic.
- When a function is defined, it is automatically assigned a name of the
form fi where i is a number which starts at 1 and is incremented every
time a new function is defined. The name a function will be saved under
appears to the left of the field where it is defined.
- Once a function is defined, its name can be used in the definition of
other functions. For example, if two functions have been defined, the
definition of function 3 could be f1(x)+x*f2(x)
Note that we use f1(x) and not just f1.
- The functions defined will plot as soon as the field where the function was entered loses focus..
- Del Function will delete the function currently showing. When
deleting a function, make sure that it is not used in the definition of
another function. An error would occur in this case. For example, if f2(x)
= x + f1(x) and f1 is deleted,
then the definition of f2 contains an unknown
symbol, f1.
- What can be plotted?
- Any valid mathematical expression. The restriction is that the independent
variable must be x. A mathematical expression
is formed by using the independent variable x,
operations, built-in functions and user defined functions. See the
help in the Java Math Engine to learn more about expressions, variables,
built-in and user defined functions. Here are some examples of what
can be plotted
- x^3-5*x+4
- sin(x^3)
- diff(x^2-5) yes, the derivative of a function
can also be plotted!
- This site provides further
help on the syntax the Java Math Engine understand.
- The Zoom and Trace area is where zooming and tracing take place.
Use this area as follows:
- To zoom in, picture in your mind the rectangular region you would like
to zoom in. Left click on one of the corners of this imaginary region.
While holding the mouse button down, move it to the opposite corner, then
release it. As you move the mouse, a rectangle will be drawn to help you
visualize the region. Once the mouse button is released, the graph will
redraw, XMin, XMax,
YMin, YMax will be
updated.
- To go back to the original view (XMin = -10, XMax = 10, YMin = -10,
YMax = 10), press Reset Zoom.
- To trace, simply single left click in the graph area. A point will be
generated by taking the x-coordinate of the point where you clicked and
the y-coordinate on the function currently showing.
- To move the point, use the Right or Left buttons from the Zoom and Trace area. You can also move the point by using the right and left arrow keys, while focus is on the plot area. The
point will move on the function currently showing. By selecting a different
function, you can select which function you want your point to follow.
- The coordinates of the point will be displayed under X: and Y:.
- The Control Buttons area contains buttons which have a global effect
for the applet.
- The Clear All button erases all the function definitions.
- The Plot button is used to update the plot area after changes
in the other areas have been made. However, this button is not really needed as the Plot Area is updated as soon as any change is made.
- The Messages area is where the applet communicates with the user.
Error messages as well as user information is displayed there. Errors are
displayed in red, while information is displayed in black.
This applet was developed by Dr. Philippe
B. Laval, at Kennesaw State
University.
This work was funded in part by:
The National Science Foundation # DUE-9952568
The US Department of Education FIPSE #P116B00178