MathToolkit Demonstration

Although the following Applet might have some limited pedagogical benefit, it was constructed mainly as an illustration of some of the components from the MathToolkit. All the components were used "off the shelf" and the construction of the entire Applet took about 10 minutes in a Visual Development environment. (Visual Cafe)

Here are some things that you can try:

  1. Type a formula for your favorite function into the text field that is labeled "f(x)=". Then click on the Update Graph button to display the graph.
  2. Type some numbers into the table to create some points for display on the graph. (Try typing in some mathematical expressions such as sin(1) or sqrt(2).) Again, click on the Update Graph button to display the points.
  3. After clicking on the coordinate system to make sure that it has the focus, use the left and right arrow keys to trace the graph.
  4. Click and drag on the coordinate system to see the "Zoom Box" feature in action. (Any time you want to return to the original dimensions, click on the graph with the shift key held down.)

You have been using three components from the MathToolkit, but only two are visible. The first is the coordinate system on the left and it is a "MathGrapher" object. It has a lot of properties that can be adjusted either at design time or at run time. For example, you could specify the background color, the grid color, or the axes color. You can, of course, specify values for xMin, xMax, yMin, and yMax. You can prescribe the gridlines to be fine, normal, coarse, or, if you prefer, you can turn them off. You can turn the trace feature on or off. In addition to the Zoom Box mode that was illustrated there is a Zoom In and a Zoom Out mode or you can turn the Zoom feature off completely.

The second visible component is the table on the right. It is a MathTable object. The two main properties there that can be adjusted are the labels at the top of the columns.

Finally, there is an invisible component. It is a SymbolicFunction object. It accepts as a property a formula then it is passed as a property to the MathGrapher object.

There is one other component that you can see at work. After clicking on the coordinate system to give it the focus, hit the enter key. You should see a dialog box giving you an opportunity to enter in an x-value for use in the trace. The text field there looks like an ordinary JTextField, but it is actually a MathTextField. To see the difference, enter in a mathematical constant expression such as "Pi/2".

Return to the Math Toolkit Article