TheCurves may be presented as a Java application or as an applet. As an applet, it is run within a web browser as an object that appears in a web page. As an application, is runs directly under the Java Virtual Machine (JVM).
Either way, some JVM must be installed on your computer in order to use TheCurves.
To run the applet version of TheCurves, you should build the jar archive. See the file README for instructions. Once it is done, you need simply open a web page that correctly references this jar archive. For example, open any of the sample web pages in applet.
To run the application version of TheCurves, you must at least build the application. See the file README for instructions. Then you use the java command from your Java installation to run it in the JVM:
java -jar TheCurves.jar
TheCurves accepts formulas for x and y in algebraic form. (No, it doesn’t read in data files. No, it doesn’t solve differential equations.)
The x and y formulas are in terms of the family parameter r and the curve parameter t. For each increment of the family parameter, the plotter increments the value of the curve parameter, evaluating the formulas and drawing lines between the resulting coordinates.
The syntax used by the formula parser is rather loose (erroneous, even).
Terms within a formula may be grouped with parentheses.
Numbers may be entered in general engineering notation.
You may use any of the four arithmetic operators +
,
-
, *
, and /
, as well as the
exponentiation operator ^
.
You may also use any of the single-argument functions from the package
java.lang.Math, namely,
abs
asin
atan
ceil
cos
exp
floor
log
rint
round
sin
sqrt
tan
toDegrees
toRadians
The argument of the function need be enclosed in parentheses only if it consists of more than one term.
The parser also accepts the special numbers PI
and E
, and even the Greek letter π
(as it might be copied from a web page).
Most of the parameters taken by TheCurves can be set either from within
the program’s controls or preferences dialog can be set from within a
web page, both at the time the page loads by means of the HTML
param
tags for the applet, or dynamically by means of
JavaScript calls.
In most cases, for each parameter there is a directly analogous function call.
HTML param | public Applet function | argument/Controls | boolean | FALSE to show plot only |
---|---|---|---|
X-Formula | setXFormula | String | Text for x formula |
Y-Formula | setYFormula | String | Text for y formula |
XMaxYMaxXMinYMin | setXMaxYMaxXMinYMin | float,float,float,float | Plot limits: x max, y max, x min, y min |
RMaxRMinRStep | setRMaxRMinRStep | float,float,float | Family parameter limits: max, min, step |
TMaxTMinTStep | setTMaxTMinTStep | float,float,float | Curve parameter limits: max, min, step |
FamilyStartColor | setFamilyStartColor | Color | Family start color |
FamilyEndColor | setFamilyEndColor | Color | Family end color |
BackgroundColor | setBackground | Color | Plot background color |
AxisColor | setAxisColor | Color | Axis color |
LineWidth | setLineWidth | float | Plot line width |
replot | redraw the plot |