[ Prev | Main | Next ]

ArcLength Applet

ArcLength is used to show how a Riemann sum consisting of the lengths of straight line segments can be used to approximate the length of a curve. The applet supports regular functions, inverse relations, parametric curves and polar curves.

The applet tag that creates the applet is as follows:

<applet code="net.sourceforge.webcompmath.calculus.ArcLength" codebase="../../assets"
archive="webcompmath.jar,calculus.jar" height="400" width="400">
<param name="UseLoadButton" value="no" />
<param name="Example1" value="1. Standard;x^2;0;1;-1;2;0;false;-1.5,2.5,-1,5" />
<param name="Example2" value="2. Inverse;y^2;0;1;-1;2;1;false;-1,5,-1.5,2.5" />
<param name="Example3" value="3. Parametric;cos(t);sin(t);2;0;3.14159;2;false;-1.1,1.1,-0.545,1.545" />
<param name="Example4" value="4. Polar;th;0;4;0;6;3;false;-7,7,-7.38,7.38" />

This applet takes the following parameters:

Param Name Type Default Description
Example1, ... String N/A Each example is a list of strings separated by semicolons. The strings, in order, are:
1. The name of the example, displayed in the example menu.
2. The expression that defines f(x).
3. The expression that defines g(x).
4. The number of intervals.
5. The value for "a".
6. The value for "b".
7. An integer that represents what type of graph is shown. Use 0 for a normal function, 1 for the inverse of a function, 2 for a parametric curve, and 3 for a polar curve. Depending on which is used, g(x) may not be shown. Also, the variable that you use in the function expression changes. For a normal function, use x, for an inverse use y, for a parametric curve use t, and for a polar curve use th.
8. Whether to show a menu choice box to let the user pick the type of graph. "true" means to show the choice box, "false" means to hide it.
9. The xmin, xmax, ymin and ymax values for the graph region, separated by commas.

[ Prev | Main | Next ]