Use of TheCurves
a parameterized family of curves

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.

Running TheCurves as a web browser applet

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.

Running TheCurves as an application program

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,

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 parampublic Applet
value types
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

The values in HTML and JavaScript must all be quoted strings. The Color values must as hexadecimal RGB values in Java (that is, C) style:


(Note this is unlike HTML or CSS web page color syntax.)

Setting parameter values from the public Applet functions does not by itself result in the plot re-drawing. This is so that you can call several of the settings functions without the plot redrawing for each setting. When you’re done setting parameter values with these functions, call replot to cause the plot to be re-drawn.

To cause only the plot to appear in the web page, without the menu bar or the other controls, use the HTML applet <param> tag with name="Controls" value="FALSE".