Fluids Modules Tools Downloads Page - Equation Parsing Graph

return to downloads

Equation Parsing Graph lets you specify equations, and then it generates Java Applets to graph those equations online. It lets you plot multiple equations at a time, as functions of up to 6 variables.


equation parsing graph, click to enlarge

Equation Parsing Graph can be useful for helping students visualize different equations.

Download
download eqparse.zip here    (size: 0.4mb)

Working example of Equation Parsing Graph here. (requires java). "index - Param=1.html," "index - Param=2.html," and "index - Param=3.html" are the samples.

Instructions
Equation Parsing Graph is easy to use. Just unzip eqparse.zip into a web-accessible directory (i.e. an Athena www directory), and you'll have a working copy of Equation Parsing Graph.

  • To change the equations being displayed, edit the Equations.txt file. You can add and remove equations from this file. [ xmin, xmax ] is the range of x, and each "y =" specifies a new equation that you want to plot. If you're using parameters, they will be named pOne, pTwo, pThree, etc. Supported math operations include: abs, rint, sin, cos, asin, acos, tan, atan, sqrt, exp, log, sech, sinh, cosh, tanh, +, -, *, /, %, ^, (, and ).
  • Params.txt controls the parameters for each equation. You should have p1 through p6 for every equation. For the parameters that you want to use, set active=true. img is the name of the image that you want to use to represent a particular parameter. y1ImgName, y2ImgName, etc are the images used to represent the equations in the legend. If you don't specify an image, the program will use plain text. If you don't want a particular equation to have a Legend, then enter "noLegend" at the end of the equation's entry in Params.txt.
  • Take a look at the html code for "index - Param=1.html." Notice the two occurences of VALUE="1" in the code. VALUE="1" tells the program to display equation 1 on that page. So for instance, if you want to display equation 5 (if you added a fifth equation to Equations.txt), copy "index - Param=1.html" into "index - Param=5.html" and change the two VALUE="1" snippets into VALUE="5". Note that the html file name does not need to be of the form "index - Param=x.html". You can rename it to anything you want. The important thing is to change the VALUE="x" fields.
  • When viewing Equation applets, you can zoom in and out. Zooming works with mouse buttons. Double-click the left button to zoom in. Single-click the right button to zoom out. If you only want to zoom on the x-axis, then hold CTRL as you click. If you only want to zoom on the y-axis, then hold SHIFT as you click.

    Troubleshooting
  • Java JRE is required. If things don't work, try upgrading to Java J2SE JRE 1.4 or higher.
  • If the graph does not look like it's being displayed, try opening the page in a new browser.
  • Also, zoom in (double left click) & out (right click) in order to refresh the graph if you don't see it.
  • Note that ln(x) is not recongized. You can use log(x)/0.434, which gives the same result.
  • Comments/questions to T. Lin

    MIT