Exploring Analyic Geometry with Mathematica®

Home Contents Commands Packages Explorations Reference
Tour Lines Circles Conics Analysis Tangents

Approximate Arc Length of a Curve

narclen.html

Exploration

The arc length of a smooth, parametrically defined curve can be approximated by a polygon connecting a sequence of points on the curve. Write a Mathematica function of the form NArcLength2D[crv,{t1,t2},n] that approximates the arc length of a curve between two parameter alues using a specified number of coordinates at equal parameter intervals between two given parameters. Produce a graph illustrating the convergence of the approximation to the Descarta2D function ArcLength2Dcrv, {t1,t2}].

Approach

Sum the distances between the points on the curve.

Initialize

To initialize Descarta2D, select the input cell bracket and press SHIFT-Enter.

This initialization assumes that the Descarta2D software has been copied into one of the standard directories for AddOns which are on the Mathematica search path, $Path.

<<Descarta2D`

Solution

Define a function for the arc length by polygonal approximation.

Off[General::spell1];
NArcLength2D[obj_,{t1_,t2_},n_] :=
   Module[{incr=(t2-t1)/n},
      Sum[
         Distance2D[
            obj[t1+i*incr]//N,
            obj[t1+(i+1)*incr]//N],
         {i,0,n-1}] ];
On[General::spell1];

Create an object for validating the function.

ca1=ConicArc2D[{0,0},{2,1},{3,0},3/4];

Create a table of coordinates to plot.  The x-coordinate is the number of points used in the approximation and the y-coordinate is the difference between the Descarta2D function and the polygonal approximation.

t1=1/4;
t2=3/4;
arclen1=ArcLength2D[ca1,{t1,t2}]//N;
pts=Table[{n,arclen1-NArcLength2D[ca1,{t1,t2},n]},
          {n,10,100,5}]

"narclen_1.gif"

Plot the results.

"narclen_2.gif"

"narclen_3.gif"

Graphics saved as "narcle01.eps".


Copyright © 1999-2007 Donald L. Vossler, Descarta2D Publishing
www.Descarta2D.com