Mathlets: A Guide for Authors and Other "Power Users"

This guide provides specific information for authors and other users interested in embedding the applets from the Mathlets package into their own materials.

[This document is subject to change, as applets are added to the collection and features are added to existing applets.]

Embedding an Applet

Since the applets in the current version of the Mathlets package have been written to use features ofJava2, they require a recent version of the Java Plug-in. However, early versions of the Java2 Plug-in did not have adequate support for "scripting," so in order to use the JavaScript interface described below, you will have to use Java version 1.3 or later. There is also an issue regarding whether to use the HTML3-style <applet> tag to embed applets, or instead use the HTML4-compliant <object>. Although technically the <applet> tag is deprecated in HTML4, the Java Plug-in (again, version 1.3 or later) can force the browser to recognize the <applet> tag, so there is no particular reason to prefer the <object> tag.

To embed an applet in an HTML document, then, use the HTML <applet> tag -- for example, the tag to embed the Tangent Lines applet looks like this:

<applet
codebase="http://cs.jsu.edu/mcis/faculty/leathrum/Mathlets/"
name="tan"
code="Tangent.class"
archive="tangents.jar, mathlets2.jar, locales.jar"
height=375 width=700>
</applet>

All applet tags need the height and width attributes, but you will have to determine these based on the layout of your Web page. Since the applets in the Mathlets package are subject to copyright restrictions, you cannot transfer the applets to your local server (without written permission from the author). Instead, you must run the applets from their home server. In order to make it easier to embed the applets without long URL's for each applet file, set the codebase attribute exactly as shown above. The name tag is not absolutely necessary for the applet, but makes much of the JavaScript described below much simpler. Each applet tag should be given a different value for the name attribute. The tag will also need both the code and archive attributes. The code attribute will contain an applet-specific class file name, and the archive attribute will contain an applet-specific JAR file name and the file names mathlets2.jar, which refers to the JAR file which contains shared classes for the Mathlets package, and locales.jar, which contains the Java properties files for all locales currently available in translation. The applet-specific code and archive names are listed in the parameter table below.

Using Parameters I: Applet Parameters in HTML

If you just use the applet tag as described above, the applet will appear in the Web page, but will be "blank" -- no graph, no functions in the text input fields, etc. To load an example into the applet when the Web page is displayed on your browser, you must send parameters to the applet, to specify the values of the different fields. This is done using the HTML <param> tag, which must appear between the <applet> and </applet> tags. The sample below shows how to load a simple example with exponential functions into the Tangent Lines applet:

<applet
codebase="http://cs.jsu.edu/mcis/faculty/leathrum/Mathlets/"
name="tan"
code="Tangent.class"
archive="tangents.jar, mathlets2.jar, locales.jar"
height=375 width=700>
<param name="f" value="exp(x)">
<param name="fp" value="exp(x)">
<param name="x" value="1.0">
</applet>

Each applet has a list of allowed parameters, given in the parameter tables below. The three parameters shown above set the three text input fields in the applet (for f (x), f '(x), and x, respectively) to the values shown, to draw the graph of f (x) = ex and its tangent lines, starting with the tangent line at x=1. The parameters are not all necessary when using param tags -- if a parameter is missing, that input field is left in its default value (usually blank), and the applet draws its graph as best it can given the information it does have.

Using Parameters II: Click and Load with JavaScript

The "Click and Load" interface for the Mathlets provides another way of loading examples into the applet, by associating a sequence of JavaScript commands with a link in the HTML text. The commands are associated with the onClick event handler in an <a> (anchor) tag (or any other tag for which the onClick attribute is valid). Since such an anchor can appear anywhere within the HTML text, it is a good idea to provide a way for the browser to return to the location of the applet within the Web page. To do this, include an internal anchor target immediately before the <applet> tag:

<a name="applettop"></a>

This associates the name "applettop" with the position of the applet, and this name can be used in a URL in other links to refer to this position in the Web page. At another position in the Web page, another anchor tag can now be used to set up a link which loads an example into the applet and returns the browser to the position of the applet in the page. Here is an example of such a link:

<a href="#applettop"
onClick="document.tan.jsClear();
document.tan.jsSetField('f','sin(x)');
document.tan.jsSetField('fp','cos(x)');
document.tan.jsSetField('x','0.0');
document.tan.jsDraw()">
link text for sine example</a>

Note first the href field in the anchor tag -- the URL here simply refers to the position of the target anchor at the position of the applet tag in the page. The onClick attribute contains the JavaScript commands which load the example into the applet. Recall that the applet was given a name in the name attribute of the applet tag -- in this example the name "tan".

Each applet in the Mathlets package includes four commands which are available for JavaScript calls: jsClear, jsSetField, jsDraw, and jsGetField. The first three of these will be described in examples here; jsGetField will be discussed later.

To call, for example, the jsClear command in the tan applet, it is important to know that the tan object is contained in the JavaScript document object. So the call to the jsClear method looks like:

document.tan.jsClear()

The jsClear command does not take any parameters, but the pair of parentheses must still be used. The jsClear command has the effect of setting all input fields in the applet to default values (usually blank). It generally does not redraw the graphs yet -- that activity is carried out by the jsDraw command. The jsDraw command also does not take any parameters.

However, before redrawing the graphs, you may want to set some of the input fields to new values using the jsSetField command. The jsSetField command takes two parameters, both strings. Note in the example, though, that the strings are delimited with single-quotation marks -- this is because the normal double-quotation marks are used to delimit the text for the onClick attribute. The two strings give the name of an applet parameter, and its value. The names of the applet parameters are the same as those used in the HTML param tags as described above, and are given in the parameter tables below. In the example, the three parameters in the Tangent Lines applet are set to show tangent lines for the sine function, starting with the tangent line at x=0.

Don't forget to separate successive JavaScript commands with a semicolon, as seen in the example above.

Using Parameters III: The Other Direction

The jsGetField command can be used to transfer information in the other direction: from the applet to the HTML page. In particular, this command can be used to transfer the contents of an applet's input field to an HTML form input field. The jsGetField command takes only one parameter, a string giving the name of the applet parameter, and it returns a string value with the contents of the corresponding applet input field. Indeed, along with the jsSetField command, the contents can also be transferred from the HTML form input field back into the applet input field. The example below works with the Tangent Lines applet above, and shows an HTML form with an input field and two buttons, a "Get" button to transfer from the applet to the form, and a "Put" button to transfer from the form to the applet.

<form name="tanform">
<input type=text name=field1 value="" size=30>
<input type=button name=get1 value="Get"
onClick="document.tanform.field1.value=document.tan.jsGetField('f');">
<input type=button name=put1 value="Put"
onClick="document.tan.jsSetField('f',document.testform.field1.value);
document.tan.jsDraw();">
</form>

Note the name attribute in the form tag, and how that name is used in the JavaScript commands in the onClick attributes for the two buttons. The name given to the text input field in its name attribute is also used in the JavaScript commands to identify that field and either retrieve or change its contents. Note also that the "Put" button's onClick commands include a call to the applet's jsDraw command, to redraw the graph with the new values.

Complete Example

The example below uses all of the HTML and JavaScript code described in the samples above using the Tangent Lines applet, with one minor exception: since this page resides with the applets, the codebase attribute for the applet tag is unnecessary, so it is not used here.

link text for sine example

f (x)=
f '(x)=
x=

As in the example code given above, the exponential function example is loaded with the page, using param tags, and the link text below the applet loads the sine function example using the JavaScript interface. The form input fields can be used to transfer information into and out of the corresponding applet input fields, when the buttons are clicked.

For a more complete sample using both param tags and the JavaScript interface, see the extended exploration of exponential functions and their derivatives.

An Alternative to JavaScript Click and Load

Since the "scripting" necessary to use the click-and-load interface described above is now widely supported, there is little need for an alternative, but nonetheless it seems pertinent to point out an alternative which uses only HTML parameters. In a separate HTML file, set up an applet tag with the necessary param tags to load the example -- for example, suppose the file sine.html contains the following HTML code:

<html>
<body>
<applet
codebase="http://cs.jsu.edu/mcis/faculty/leathrum/Mathlets"
code="Tangent.class"
archive="tangents.jar,mathlets.jar"
height=300 width=600>
<param name="f" value="sin(x)">
<param name="fp" value="cos(x)">
<param name="x" value="0.0">
</applet>
</body>
</html>

Now, in your Web page, use an anchor tag with the target attribute to load the file sine.html into a new browser window when the link is clicked:

<a target="_new" href="sine.html">link text for sine example</a>

This has the advantage of not using the JavaScript interface while still not closing the Web page in which the link appears, but has the disadvantages of reloading the applet for each example, possibly cluttering the screen with lots of browser windows, and requiring a separate HTML file for each example. This approach is not used in the Mathlets pages.

Parameter Table

There are three groups of "common" parameters: locale parameters, parameters for graph coordinate settings in two-dimensional graphing applets, and parameters for graph coordinate settings and view angle and graphing grid settings in three-dimensional graphing applets. All applets support the locale parameters; however, the locale parameters are not available to the JavaScript commands described above (once the locale is set, it should not be subject to change). In some applets, no other common parameters at all are used, and in other applets, some modifications are made to the common list. These changes are indicated in the list of applet parameters given below. The first three lists, though, give the three groups of common parameters.

The tables give the names of the parameters, their types (choices are: "real" = real number in decimal notation, "int" = integer value possibly including sign, "bool" = boolean value either "true" or "false", "string" = case-sensitive character string, "expr" = expression string to be parsed and evaluated by the applet), the default value as set by the applet's "Clear" button or jsClear command (listed as "empty" if field is erased, which is treated as undefined for real valued fields), and a brief description of the role of the parameter in the applet.

Parameter names are case-sensitive, but in these applets are generally lower-case. Parameter values generally are not case-sensitive (except for parameters of type "string", which are always case-sensitive).

Parameters of type "expr" (expressions) may also include an indication in the description of what free variable(s) are recognized in the expression. In particular, this indicates how the variable names are to be typewritten -- for example, in polar coordinates, the function f (θ) is given as an expression with typewritten variable name "t".

Locale Parameters
These parameters set the Java runtime's locale (see the Java documentation for the Locale class). Based on the locale, different strings are loaded for labels and buttons in the applet (from data given in the properties files in the locales.jar package). These parameters are supported by all applets, but are not available to the JavaScript interface commands.
Name Type Default Description
language string "en" ISO 2-letter language code
country string "en" ISO 2-letter country code
2-D Graphing Common Parameters
These parameters set values for the fields shown in the pop-up window which appears when the "Bounds" button under the graph is pressed.
Name Type Default Description
xmin real -10.0 minimum value on x-axis
xmax real 10.0 maximum value on x-axis
delx real 1.0 distance between marks on x-axis
ymin real -10.0 minimum value on y-axis
ymax real 10.0 maximum value on y-axis
dely real 1.0 distance between marks on y-axis

3-D Graphing Common Parameters
These parameters set values for the fields shown in the pop-up window which appears when the "Bounds" button under the graph is pressed.
Name Type Default Description
xmin real -10.0 minimum value on x-axis
xmax real 10.0 maximum value on x-axis
delx real 1.0 distance between marks on x-axis
ymin real -10.0 minimum value on y-axis
ymax real 10.0 maximum value on y-axis
dely real 1.0 distance between marks on y-axis
zmin real -10.0 minimum value on z-axis
zmax real 10.0 maximum value on z-axis
delz real 1.0 distance between marks on z-axis
viewa real 45.0 view angle a (in degrees)
viewb real 45.0 view angle b (in degrees)
xgrid real 1.0 graph grid spacing in x direction
ygrid real 1.0 graph grid spacing in y direction

Applet Parameters
Also given in the table below are values for the code and archive attributes for each applet, as described above, and an indication of which group of the above common graphing parameters (if any) are supported. Please note that all applets support the locale parameters, even if the common parameters are listed as "none."

The applets are listed alphabetically by the archive file name.

Bezier Curves
code: Bezier.class
archive: bezier.jar
Common: 2-D
Name Type Default Description
x1 real -1.0 x coordinate of first point
y1 real -1.0 y coordinate of first point
x2 real -1.0 x coordinate of second point
y2 real 1.0 y coordinate of second point
x3 real 1.0 x coordinate of third point
y3 real 1.0 y coordinate of third point
x4 real 1.0 x coordinate of fourth point
y4 real -1.0 y coordinate of fourth point

Conic Sections
code: Conic.class
archive: conics.jar
Common: none
Name Type Default Description
a real 1.0 x2 term coefficient A
b real 0.0 xy term coefficient B
c real 1.0 y2 term coefficient C
d real 0.0 x term coefficient D
e real 0.0 y term coefficient E
f real -1.0 constant term F
h real 0.0 horizontal translation distance
k real 0.0 vertical translation distance
t real 0.0 rotation angle (in degrees)

Continuity
code: Continuity.class
archive: contin.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
c real empty limit point c for continuity test
x real empty start point x for limit to c

Cylindrical Coordinates (Faceted Surface)
code: GrapherCyl.class
archive: cylindrical.jar
Common: 3-D, with changes noted below
Name Type Default Description
f1 expr empty function f1(r,θ), free variables r and t
f1ch bool true checkbox state for first function
f2 expr empty function f2(r,θ), free variables r and t
f2ch bool false checkbox state for second function
f3 expr empty function f3(r,θ), free variables r and t
f3ch bool false checkbox state for third function
rmin real 0.0 minimum value of variable r
rmax real 10.0 maximum value of variable r
thetamin real 0.0 times π, minimum value of variable θ (angle in radians)
thetamax real 2.0 times π, maximum value of variable θ (angle in radians)
rgrid real 1.0 replaces xgrid, applies to variable r
thetagrid real 0.1 replaces ygrid, applies to variable θ

Cylindrical Coordinates (Wireframe)
code: GrapherCylWires.class
archive: cylindricalw.jar
Common: 3-D, with changes noted below
Name Type Default Description
f expr empty function f (r,θ), free variables r and t
rmin real 0.0 minimum value of variable r
rmax real 10.0 maximum value of variable r
tmin real 0.0 times π, minimum value of variable θ (angle in radians)
tmax real 2.0 times π, maximum value of variable θ (angle in radians)
rgrid real 1.0 replaces xgrid, applies to variable r
tgrid real 0.2 replaces ygrid, applies to variable θ

Definite Integrals
code: Definite.class
archive: definite.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
af expr empty antiderivative F (x), free variable x
a real empty interval left endpoint a
b real empty interval right endpoint b

Derivative Calculator
code: DerivCalc.class
archive: derivcalc.jar
Common: none
Name Type Default Description
expr expr empty derivative expression, free variable x
var string empty variable name -- valid values: empty, "x", "y", "z", "r", "s", "t", "u", "v"

Differential Equations
code: DiffEqGraph.class
archive: diffeq.jar
Common: 2-D
Name Type Default Description
yp expr empty function y'=f (x,y), free variables x and y
x0 real 0.0 initial point x coordinate
y0 real 0.0 initial point y coordinate

Systems of Two Differential Equations
code: DiffEq2Graph.class
archive: diffeq2.jar
Common: 2-D
Name Type Default Description
xp expr empty function x'=f (x,y), free variables x and y
yp expr empty function y'=g (x,y), free variables x and y
x0 real 0.0 initial x value
y0 real 1.0 initial y value
t0 real 0.0 initial t value

Divergence and Curl
code: DivCurlGraph.class
archive: divcurl.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x,y) for vector field F(x,y)=<f,g>, free variables x and y
g expr empty function g(x,y) for vector field F(x,y)=<f,g>, free variables x and y
div expr empty function divF(x,y)=fx+gy, free variables x and y
curl expr empty function curlF(x,y)=gx-fy, free variables x and y
x real 0.0 x-coordinate of initial point
y real 0.0 y-coordinate of initial point
tmax real 0.5 maximum value of parameter t for graphing paths
s real 0.5 side length of square at initial point

Exponential Functions
code: ExpGraph.class
archive: exponential.jar
Common: 2-D
Name Type Default Description
x0 real 0.0 x coordinate of first point
y0 real 1.0 y coordinate of first point
x1 real 1.0 x coordinate of second point
y1 real 2.718... y coordinate of second point (default = e)

Expression-Based Calculator
code: ExprCalc.class
archive: exprcalc.jar
Common: none
Name Type Default Description
expr expr empty expression to be evaluated (no free variables)

Graphing Functions
code: Grapher.class
archive: grapher.jar
Common: 2-D
Name Type Default Description
f1 expr empty function f1(x), free variable x
f1ch bool true checkbox state for first function
f2 expr empty function f2(x), free variable x
f2ch bool false checkbox state for second function
f3 expr empty function f3(x), free variable x
f3ch bool false checkbox state for third function
f4 expr empty function f4(x), free variable x
f4ch bool false checkbox state for fourth function
f5 expr empty function f5(x), free variable x
f5ch bool false checkbox state for fifth function

Graphing Functions in 3-D (Faceted Surface)
code: Grapher3d.class
archive: grapher3d.jar
Common: 3-D
Name Type Default Description
f1 expr empty function f1(x,y), free variables x and y
f1ch bool true checkbox state for first function
f2 expr empty function f2(x,y), free variables x and y
f2ch bool false checkbox state for second function
f3 expr empty function f3(x,y), free variables x and y
f3ch bool false checkbox state for third function

Graphing Functions in 3-D (Wireframe)
code: Grapher3dw.class
archive: grapher3dw.jar
Common: 3-D
Name Type Default Description
f expr empty function f (x,y), free variables x and y

Jacobian
code: Jacobian.class
archive: jacobian.jar
Common: 2-D, two graphs, parameter names for second graph given below
Name Type Default Description
f expr empty function x=f (u,v), free variables u and v
g expr empty function x=g(u,v), free variables u and v
J expr empty Jacobian J(u,v)=fugv-fvgu, free variables u and v
u real 0.0 u-coordinate of initial point
v real 0.0 v-coordinate of initial point
ugrid real 1.0 grid spacing in u direction
vgrid real 1.0 grid spacing in v direction
ugridmin real -10.0 minimum u value for grid region
ugridmax real 10.0 maximum u value for grid region
vgridmin real -10.0 minimum v value for grid region
vgridmax real 10.0 maximum v value for grid region
umin real -10.0 equivalent of xmin for second graph
umax real 10.0 equivalent of xmax for second graph
delu real 1.0 equivalent of delx for second graph
vmin real -10.0 equivalent of ymin for second graph
vmax real 10.0 equivalent of ymax for second graph
delv real 1.0 equivalent of dely for second graph

Limits
code: Limits.class
archive: limits.jar
Common: none
Name Type Default Description
f expr empty function f (x), free variable x
c real 0.0 target value of limit
d real 1.0 starting distance away from target value

Systems of Linear Equations
code: Linear.class
archive: linear.jar
Common: 2-D
Name Type Default Description
a real 1.0 coefficient a in system
b real 0.0 coefficient b in system
c real 1.0 coefficient c in system
d real 0.0 coefficient d in system
e real 1.0 coefficient e in system
f real 1.0 coefficient f in system

Lines
code: LineGraph.class
archive: lines.jar
Common: 2-D
Name Type Default Description
m real 0.0 slope of line
b real 1.0 y-intercept value for line
x0 real -1.0 x-coordinate of first point
y0 real 1.0 y-coordinate of first point
x1 real 1.0 x-coordinate of second point
y1 real 1.0 y-coordinate of second point
type string "two-points" determines how values used -- valid strings:
"two-points", "point-slope", or "slope-intercept"

Mean Value Theorem
code: MeanVal.class
archive: meanval.jar
Common: 2-D
Name Type Default Description
x1 real -1.0 x-coordinate of first point for secant line
x2 real 1.0 x-coordinate of second point for secant line
c real 0.0 x-coordinate of point for tangent line
f expr empty function f (x), free variable x
fp expr empty function f '(x), free variable x

Newton's Method
code: Newton.class
archive: newton.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
fp expr empty derivative f '(x), free variable x
x0 real empty starting x-value for iteration
n int 2 number of iterations to show

Parabolas
code: Parabola.class
archive: parabolas.jar
Common: 2-D
Name Type Default Description
a1 real 1.0 coefficient a in general form
b real 0.0 coefficient b in general form
c real 0.0 coefficient c in general form
a2 real 1.0 coefficient a in standard form
h real 0.0 x-coordinate of vertex for standard form
k real 0.0 y-coordinate of vertex for standard form

Graphing Parametric Equations in Two Dimensions
code: ParaGrapher.class
archive: parametric.jar
Common: 2-D
Name Type Default Description
x1 expr empty function x=f (t) for first set of equations, free variable t
y1 expr empty function y=g(t) for first set of equations, free variable t
ch1 bool true checkbox state for first set of equations
x2 expr empty function x=f (t) for second set of equations, free variable t
y2 expr empty function t=g(t) for second set of equations, free variable t
ch2 bool false checkbox state for second set of equations
x3 expr empty function x=f (t) for third set of equations, free variable t
y3 expr empty function y=g(t) for third set of equations, free variable t
ch3 bool false checkbox state for third set of equations
tmin real 0.0 minimum value for free variable t
tmax real 10.0 maximum value for free variable t

Graphing Parametric Paths in Three Dimensions
code: ParaPath3d.class
archive: parapath.jar
Common: 3-D, except that xgrid and ygrid not available
Name Type Default Description
x1 expr empty function x=f (t) for first set of equations, free variable t
y1 expr empty function y=g(t) for first set of equations, free variable t
z1 expr empty function z=h(t) for first set of equations, free variable t
ch1 bool true checkbox state for first set of equations
tmin1 real 0.0 minimum value of free variable t for first set of equations
tmax1 real 10.0 maximum value of free variable t for first set of equations
x2 expr empty function x=f (t) for seond set of equations, free variable t
y2 expr empty function y=g(t) for second set of equations, free variable t
z2 expr empty function z=h(t) for second set of equations, free variable t
ch2 bool false checkbox state for second set of equations
tmin2 real 0.0 minimum value of free variable t for second set of equations
tmax2 real 10.0 maximum value of free variable t for second set of equations
x3 expr empty function x=f (t) for third set of equations, free variable t
y3 expr empty function y=g(t) for third set of equations, free variable t
z3 expr empty function z=h(t) for third set of equations, free variable t
ch3 bool false checkbox state for third set of equations
tmin3 real 0.0 minimum value of free variable t for third set of equations
tmax3 real 10.0 maximum value of free variable t for third set of equations

Graphing Parametric Surfaces in Three Dimensions (Faceted Surface)
code: ParaSurf3d.class
archive: parasurf.jar
Common: 3-D, with changes noted below
Name Type Default Description
x1 expr empty function x=f (s,t) for first set of equations, free variables s and t
y1 expr empty function y=g(s,t) for first set of equations, free variables s and t
z1 expr empty function z=h(s,t) for first set of equations, free variables s and t
ch1 bool true checkbox state for first set of equations
tmin1 real 0.0 minimum value of free variable t for first set of equations
tmax1 real 10.0 maximum value of free variable t for first set of equations
smin1 real 0.0 minimum value of free variable s for first set of equations
smax1 real 10.0 maximum value of free variable s for first set of equations
x2 expr empty function x=f (s,t) for second set of equations, free variables s and t
y2 expr empty function y=g(s,t) for second set of equations, free variables s and t
z2 expr empty function z=h(s,t) for second set of equations, free variables s and t
ch2 bool false checkbox state for second set of equations
tmin2 real 0.0 minimum value of free variable t for second set of equations
tmax2 real 10.0 maximum value of free variable t for second set of equations
smin2 real 0.0 minimum value of free variable s for second set of equations
smax2 real 10.0 maximum value of free variable s for second set of equations
sgrid real 1.0 replaces xgrid, applies to free variable s
tgrid real 1.0 replaces ygrid, applies to free variable t

Graphing Parametric Surfaces in Three Dimensions (Wireframe)
code: ParaSurf3dWires.class
archive: parasurfw.jar
Common: 3-D, with changes noted below
Name Type Default Description
x expr empty function x=f (s,t), free variables s and t
y expr empty function y=g(s,t), free variables s and t
z expr empty function z=h(s,t), free variables s and t
tmin real 0.0 minimum value of free variable t
tmax real 10.0 maximum value of free variable t
smin real 0.0 minimum value of free variable s
smax real 10.0 maximum value of free variable s
sgrid real 1.0 replaces xgrid, applies to free variable s
tgrid real 1.0 replaces ygrid, applies to free variable t

Integration by Parts
code: Parts.class
archive: parts.jar
Common: 2-D, two graphs, parameter names for second graph given below
Name Type Default Description
g expr empty function g(x), free variable x
h expr empty function h(x), free variable x
hp expr empty derivative h'(x), free variable x
a real empty left endpoint of interval
b real empty right endpoint of interval
umin real -10.0 equivalent of xmin for second graph
umax real 10.0 equivalent of xmax for second graph
delu real 1.0 equivalent of delx for second graph
vmin real -10.0 equivalent of ymin for second graph
vmax real 10.0 equivalent of ymax for second graph
delv real 1.0 equivalent of dely for second graph

Transformations of Periodic Functions
code: Periodic.class
archive: periodic.jar
Common: none
Name Type Default Description
a real 1.0 coefficient A in equation
b real 1.0 coefficient B in equation
c real 0.0 coefficient C in equation
d real 0.0 coefficient D in equation

Graphing in Polar Coordinates
code: PolarGrapher.class
archive: polar.jar
Common: 2-D
Name Type Default Description
f1 expr empty function r=f1(θ), free variable t
f1ch bool true checkbox state for first function
f2 expr empty function r=f2(θ), free variable t
f2ch bool true checkbox state for second function
f3 expr empty function r=f3(θ), free variable t
f3ch bool true checkbox state for third function
f4 expr empty function r=f4(θ), free variable t
f4ch bool true checkbox state for fourth function
f5 expr empty function r=f5(θ), free variable t
f5ch bool true checkbox state for fifth function
tmin real 0.0 times π, minimum value of free variable θ (angle in radians)
tmax real 2.0 times π, maximum value of free variable θ (angle in radians)

Roots of Polynomial Functions
code: PolyRoots.class
archive: polyroots.jar
Common: 2-D
Name Type Default Description
n int 2 number of points (degree of polynomial)
an real 1.0 leading coefficient
c1 real -1.0 x-coordinate of first point on x-axis
c2 real 1.0 x-coordinate of second point on x-axis
c3 real empty x-coordinate of third point on x-axis
c4 real empty x-coordinate of fourth point on x-axis
c5 real empty x-coordinate of fifth point on x-axis
c6 real empty x-coordinate of sixth point on x-axis

Points, Lines, and Vectors in 3-D
code: PointLineVec3d.class
archive: ptvec3.jar
Common: 3-D, except that xgrid and ygrid not available
Name Type Default Description
x1 real empty x-coordinate of first point
y1 real empty y-coordinate of first point
z1 real empty z-coordinate of first point
x2 real empty x-coordinate of second point
y2 real empty y-coordinate of second point
z2 real empty z-coordinate of second point
ch string "point" indicates state of radio group buttons
valid values: "point", "line", "vector"

Riemann Sums
code: Riemann.class
archive: riemann.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
a real empty left endpoint of interval
b real empty right endpoint of interval
n int 10 number of subintervals to use for approximation
lr real 0.5 slider position -- valid values 0.0 (left) to 1.0 (right)

Secant Lines
code: Secant.class
archive: secants.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
x1 real empty x-coordinate of first point
x2 real empty x-coordinate of second point

Second Derivatives and Concavity
code: Second.class
archive: second.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
fp expr empty derivative f '(x), free variable x
fpp expr empty second derivative f ''(x), free variable x
c real empty x-coordinate of point

Sequences and Series
code: SeqSer.class
archive: seqser.jar
Common: none (uses custom version of 2-D, see below)
Name Type Default Description
nth expr empty expression for nth term of series, free variable n
nstart int 0 value of n at which sequence starts
nmin int 0 minimum value of n shown on graph (not same as nstart)
graph shows from nmin to nmin+100 (fixed width)
deln int 5 distance between has marks on n-axis (given in n units)
ymin real -10.0 minimum value on y-axis
ymax real 10.0 maximum value on y-axis
dely real 1.0 distance between marks on y-axis

Spherical Coordinates (Faceted Surface)
code: GrapherSph.class
archive: spherical.jar
Common: 3-D, with changes noted below
Name Type Default Description
f1 expr empty function f1(θ,φ), free variables t and s
f1ch bool true checkbox state for first function
f2 expr empty function f2(θ,φ), free variables t and s
f2ch bool false checkbox state for second function
f3 expr empty function f3(θ,φ), free variables t and s
f3ch bool false checkbox state for third function
thetamin real 0.0 times π, minimum value of variable θ (angle in radians)
thetamax real 2.0 times π, maximum value of variable θ (angle in radians)
phimin real 0.0 times π, minimum value of variable φ (angle in radians)
phimax real 1.0 times π, maximum value of variable φ (angle in radians)
thetagrid real 0.1 replaces xgrid, applies to variable θ
phigrid real 0.1 replaces ygrid, applies to variable φ

Spherical Coordinates (Wireframe)
code: GrapherSphWires.class
archive: sphericalw.jar
Common: 3-D, with changes noted below
Name Type Default Description
f1 expr empty function f (θ,φ), free variables t and s
thetamin real 0.0 times π, minimum value of variable θ (angle in radians)
thetamax real 2.0 times π, maximum value of variable θ (angle in radians)
phimin real 0.0 times π, minimum value of variable φ (angle in radians)
phimax real 1.0 times π, maximum value of variable φ (angle in radians)
thetagrid real 0.1 replaces xgrid, applies to variable θ
phigrid real 0.1 replaces ygrid, applies to variable φ

Substitution
code: Subst.class
archive: subst.jar
Common: 2-D, two graphs, parameter names for second graph given below
Name Type Default Description
f expr empty function f (x), free variable x
g expr empty function g(x), free variable x
gp expr empty derivative g'(x), free variable x
a real empty left endpoint of interval
b real empty right endpoint of interval
umin real -10.0 equivalent of xmin for second graph
umax real 10.0 equivalent of xmax for second graph
delu real 1.0 equivalent of delx for second graph
vmin real -10.0 equivalent of ymin for second graph
vmax real 10.0 equivalent of ymax for second graph
delv real 1.0 equivalent of dely for second graph

Substitution 2
code: Subst2.class
archive: subst2.jar
Common: 2-D, two graphs, parameter names for second graph given below
Name Type Default Description
f expr empty function f (x), free variable x
g expr empty function g(x), free variable x
gp expr empty derivative g'(x), free variable x
a real 0.0 x-coordinate of point on x-axis
base real 1.0 base length of rectangle in left graph
umin real -10.0 equivalent of xmin for second graph
umax real 10.0 equivalent of xmax for second graph
delu real 1.0 equivalent of delx for second graph
vmin real -10.0 equivalent of ymin for second graph
vmax real 10.0 equivalent of ymax for second graph
delv real 1.0 equivalent of dely for second graph

Tangent Lines
code: Tangent.class
archive: tangents.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
fp expr empty derivative f '(x), free variable x
x real empty x-coordinate of point

Taylor Polynomials
code: Taylor.class
archive: taylor.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
fp expr empty derivative f '(x), free variable x
fpp expr empty second derivative f ''(x), free variable x
fppp expr empty third derivative f '''(x), free variable x
fpppp expr empty fourth derivative f ''''(x), free variable x
c real empty x-coordinate of point

T-N-B Frame
code: TNBVecs.class
archive: tnbframe.jar
Common: 3-D, except that xgrid and ygrid not available
Name Type Default Description
f expr empty function f (t), free variable t
g expr empty function g(t), free variable t
h expr empty function h(t), free variable t
fp expr empty derivative f '(t), free variable t
gp expr empty derivative g'(t), free variable t
hp expr empty derivative h'(t), free variable t
fpp expr empty second derivative f ''(t), free variable t
gpp expr empty second derivative g''(t), free variable t
hpp expr empty second derivative h''(t), free variable t
tmin real 0.0 minimum value of parameter t
tmax 10.0 10.0 maximum value of parameter t
t real 0.0 value of parameter t at which vector frame is drawn

Tracing Graphs of Functions
code: Tracer.class
archive: tracer.jar
Common: 2-D
Name Type Default Description
f1 expr empty function f1(x), free variable x
f1ch bool true checkbox state for first function
f2 expr empty function f2(x), free variable x
f2ch bool false checkbox state for second function
c real empty x-coordinate of point(s)

Numerical Integration
code: Trapsimp.class
archive: trapsimp.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
a real empty left endpoint of interval
b real empty right endpoint of interval
ntrap int 10 number of subintervals, Trapezoid Rule
nsimp int 10 number of subintervals, Simpson's Rule

Area Between Two Curves
code: Twocurves.class
archive: twocurves.jar
Common: 2-D
Name Type Default Description
f expr empty function f (x), free variable x
af expr empty antiderivative F (x), free variable x
g expr empty function g(x), free variable x
ag expr empty antiderivative G(x), free variable x
a real empty left endpoint of interval
b real empty right endpoint of interval

Vector Fields and Phase Plots, 2-D
code: VecFieldGraph.class
archive: vecfield.jar
Common: 2-D
Name Type Default Description
xp expr empty function x'=f (x,y), free variables x and y
yp expr empty function y'=g(x,y), free variables x and y
x0 real 0.0 x-coordinate of initial value point
y0 real 0.0 y-coordinate of initial value point
tmax real 5.0 maximum value of parameter t -- path drawn from t=0 to tmax
fdelx real 1.0 horizontal distance between points at which vectors are drawn in field
fdely real 1.0 vertical distance between points at which vectors are drawn in field
fscale real 0.1 scaling factor applied to lengths of vectors in field

Vector Fields and Phase Plots, 3-D
code: VecFieldGraph3d.class
archive: vecfield3.jar
Common: 3-D, except that xgrid and ygrid not available
Name Type Default Description
xp expr empty function x'=f (x,y), free variables x, y, and z
yp expr empty function y'=g(x,y), free variables x, y, and z
zp expr empty function z'=h(x,y,z), free variables x, y, and z
x0 real 0.0 x-coordinate of initial value point
y0 real 0.0 y-coordinate of initial value point
z0 real 0.0 z-coordinate of initial value point
tmax real 5.0 maximum value of parameter t -- path drawn from t=0 to tmax