**arclength**,
a Python code which
estimates the arclength of curves of the form (x,f(x)) or
(x(t),y(t)).

We suppose a curve has been drawn, and the length of a segment of that curve is to be estimated. Several cases arise:

- (x,y(x)): the curve is an explicit function of a scalar variable x. The arclength is to be measured from (x1,y(x1)) to (x2,y(x2)). X is taken to be the parameter. The user supplies a function that evaluates dy/dx.
- (x(t),y(t)): The curve is parameterized by t. The arclength is to be measured from (x(t1),y(t1)) to (x(t2),y(t2)), and the user supplies functions that evaluate dx/dt and dy/dt. Functions described by polar coordinates are an example.

The user supplies the limits of the parameter, the function that evaluates the necessary derivatives, and a number n that indicates how the parameter interval x1 ≤ x ≤ x2 or t1 ≤ t ≤ t2 is to be subdivided.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**arclength** is available in
a MATLAB version and
an Octave version and
a Python version.

- arclength.py, the source code.
- arclength.sh, runs all the tests.
- arclength.txt, the output file.