Numerical Method For Extracting An Arc Length Parameterization From
Numerical Method For Extracting An Arc Length Parameterization From
Numerical Method For Extracting An Arc Length Parameterization From
University of Connecticut School of Medicine, Farmington, Figure 1. The arc o f a quarter-circle: circles mark five points
CT 06032, USA spaced uniformly along the arc. Five crosses mark points
*Developmentand Engineering Department, Summagraphics located by uniformly distributed values of t in equations
Corporation, 35 Brentwood Avenue, Fairfield, CT 06430, USA (4) and (S).
volume 14 number 2 march 1982 0010-4485/82/020079-03 $03.00 © 1982 Butterworth & Co (Publishers) Ltd 79
into the original parametric equation of the curve to find
the coordinates of the point.
X = X ('/finaL)
y = y ('tfinal)
Z = Z #final) (11)
A complication in applying the iteration equation is the
evaluation of the integral. This integral cannot, in general,
be solved analytically. A numerical integration technique
must therefore be applied. The authors have tried several
and have had the most success with the Romberg technique 3.
This technique required less time to converge than the
trapezoidal rule or Simpson's rule.
80 computer-aided design
point is used to start the N e w t o n -
Raphson solution and to provide a
direction
ARC_LENGTH the arc-length from the reference
point at which the computed point
will be placed
Output:
T_FINAL the parameter value of the computed
point
POINT_FINAL (3) the Cartesian coordinates of the
computed point
Figure 4. Surface generated from parametric cubic spline
boundary curves. An arc-length parameterization was used
to generate the surface.
The calling program must provide an initial guess point
to start the Newton-Raphson iteration. This guess point
also indicates the direction along the curve to place the
computed point. The guess point in our case is computed hierarchy is similarly designed. It too contains the
using equation (12). COMPUTE_DERIVATIVES routine which is the only
subroutine in the leg which knows anything about the
to = tref + (Z~tl~L) • L (12)
different primitive types. Thus, to add a new curve
where primitive to the system only a single subroutine needs to
2n" = 0.1 be modified.
AL = the arc-length from tref to t = tref + 0.1 Performance studies have been carried out on the
L = the arc-length at which to place the point from tref algorithm and indicate that the average time necessary to
cbmpute a point is about 0.05 s on a Digital Equipment
The sign of L determines whether the computed point
Corporation VAX-11/780 for the worst case B~zier
will be placed at a value of t < tref Inegative L) or at a
curves and B-splines.
value of t > tref (positive L).
The basis for the above equation is that although para-
meter value is not exactly proportional to arc-length it is CONCLUSIONS
approximately proportional for most curve types. To
A numerical technique has been developed to extract an
simplify the equation At is set to the somewhat arbitrary arc-length parameterization from parametric curves. This
constant value of 0.1. Thus this linear relationship provides
algorithm makes it possible to compute points at a given
a simple method for computing the initial guess point for
arc-length along a curve when an analytical solution is
the algorithm.
either difficult or impossible to obtain.
Although the Newton--Raphson technique can diverge
The algorithm has been incorporated into a CAD system
in certain situations 4 it has been remarkably stable in this
and is used for placing points or symbols along curves and
particular application. In over six months of use in a CAD
also as the basis for surface generation. An example of the
system not one non-convergence problem has occurred.
latter is the surface shown in Figure 4. The lines shown for
Even when given poor guess points the algorithm has
display purposes were generated using the implicit arc-
converged in every case to a solution. The explanation for
length parameterization described in this paper.
this extremely good behaviour is probably due to the fact
that arc-length is a monotonically increasing function of
parameter value. As such the function does not have the ACKNOWLEDGEMENTS
local maxima, minima or inflection points which can
The authors are grateful to Dr Bertram Herzog for his
potentially cause problems for the Newton-Raphson
comments on the manuscript and to J une Younger for
technique 4 .
patiently typing it. We would also like to thank Peter
The hierarchy chart in Figure 3 provides an overview
Thomas for his technical assistance.
of the subroutine package used to compute a point at an
arc-length. Basically, the high level PT_AT_ARC_LENGTH
routine applies the iteration equation (10) until a REFERENCES
relative error test is satisfied.
The PT_AT_ARC_LENGTH function calls individual 1 Rogers, D F and Adams, J A Mathematical elements for
routines to compute M(t) and Mr(t) as given by equations computer graphics McGraw-Hill, New York, NY, USA
(7) and ~9) respectively. The subroutine which computes 11976)
M(t) must perform a numerical integration. It does this 2 Hartley, P J and Judd, C J 'Parameterization and shape
by calling ROMBERG_INTEGRATION which in turn of B-spline curves for CAD' Comput. Aided Des. Vol 12
calls COMPUTE_G_OF_T to numerically integrate the No 5 [September 1980) pp 235-238
function (equation (10)) using the Romberg technique. A
3 Burden, R L, Faires, J D and Reynolds, A L Numerical
relative error test is also used in the integration routine.
analysis Prindle, Weber and Schmidt, Boston, MA, USA
The only routine which performs any special casing in this
leg of the hierarchy is the routine at the bottom: 11978)
COMPUTE_DERIVATIVES. This routine computes the 4 Conte, S D and de Boor, C Elementary numerical
parametric derivatives (Xt(t), Y'(t), Z'(t)) and returns the analysis: an algorithmic approach McGraw-Hill, New
result to the calling routine. The second leg of the York, NY, USA (1972)