0% found this document useful (0 votes)
128 views11 pages

Schumaker 1983

This paper presents algorithms for interpolating discrete data using C1-quadratic splines while preserving the monotonicity and convexity of the data. It discusses the conditions under which additional knots are necessary and provides a general curve fitting algorithm that allows users to adjust knot locations for optimal results. The paper includes lemmas and examples to illustrate the application of these algorithms in maintaining the shape of the interpolated function.

Uploaded by

foobie42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views11 pages

Schumaker 1983

This paper presents algorithms for interpolating discrete data using C1-quadratic splines while preserving the monotonicity and convexity of the data. It discusses the conditions under which additional knots are necessary and provides a general curve fitting algorithm that allows users to adjust knot locations for optimal results. The paper includes lemmas and examples to illustrate the application of these algorithms in maintaining the shape of the interpolated function.

Uploaded by

foobie42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

SIAM J. NUMER. ANAL.

1983 Society for Industrial and Applied Mathematics


Vol. 20, No. 4, August 198-3 0036-1429/83/2004-0014 $01.25/0

ON SHAPE PRESERVING QUADRATIC SPLINE INTERPOLATION*


Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

LARRY L. SCHUMAKERS

Abstract. In this paper we discuss the design of algorithms for interpolating discrete data using
Cl-quadratic splines in such a way that the monotonicity and/or convexity of the data is preserved. The
analysis culminates in an interactive algorithm which takes full advantage of the flexibility which quadratic
splines permit.

1. Introduction. This paper is concerned with the numerical solution of the


following interpolation problem:
Problem 1.1. Given points tl <’ < t, and values {zi}7, find s such that
(1.1) s(ti)= zi, 1, 2,..., n.
While there are many methods available for the solution of this problem, in this
paper we are concerned only with methods which preserye the shape of the data. By
this we mean that in those intervals where the data is monotone increasing or
decreasing, s should have the same property. Similarly, in those intervals where the
data is convex or concave, the same should be true of s.
Recently, several shape preserving methods for the solution of Problem 1.1 have
appeared (see [5]-[8], [10]-[17], and references therein). One of these methods (cf.
[12]-[13]) constructs s as a C quadratic spline with knots at the data points t,. tn, .,
and with one additional knot in each subinterval (ti, t/l), 1,.. n 1. ,
The purpose of this paper is to give a general treatment of the use of quadratic
splines for solving Problem 1.1. In particular, we shall show exactly when it is necessary
to add knots to a subinterval, and where they can be placed. We then use this
information to describe a numerical algorithm which can be used to take full advantage
of the flexibility which quadratic splines permit. In contrast with the previously
published algorithms which rely on an ad hoc scheme for selecting knots, our algorithm
allows the user to adjust their locations.
The paper is divided into six sections. In 2 we examine a simple Hermite
interpolation problem involving quadratic polynomials, which provides the basis for
the whole paper. The general and specific algorithms are presented in 3 and 4,
respectively. We conclude with numerical examples and remarks in 5 and 6.
2. A Hermite interpolation problem. In this section we discuss a simple two-point
Hermite interpolation problem which will be useful in solving Problem 1.1.
Problem 2.1. Let t <t2, and suppose z, z2, sl, s2 are given real numbers. Find
a function s C[t, t2] such that
(2.1) s(ti) z, s’(t) s, 1, 2.
The following lemma shows that in certain cases, Problem 2.1 can be solved by
a quadratic polynomial.
LEMMA 2.2. There is a quadratic polynomial solving Problem 2.1 if and only if

(2.2) Slq-S2__Z2--Z1
2 t-t

* Received by the editors March 30, 1982.


t Center for Approximation Theory, Department of Mathematics, Texas A&M University, College
Station, Texas 77843.
854
SHAPE PRESERVING QUADRATIC SPLINE INTERPOLATION 855

In particular, if (2.2) holds, then


(SE-Sl)(t-tl) 2
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

(2.3) S(t)=Zl+S(t--tl)+
2(t-tl)
is a solution.
The proof is elementary. [3
Proof.
When condition (2.2) fails, it is not possible to solve Problem 2.1 using a quadratic
polynomial. We now show, however, that it can always be solved using a quadratic
spline with one (simple) knot. A quadratic spline is a function s C1(-, ) such
that for some points xx < x2 <’ < xn, s restricted to each subinterval defined by the
x’s reduces to a quadratic polynomial. The x’s are called the knots of the spline (for
a detailed treatment of splines, see e.g. Schumaker [18]).
LEMMA 2.3. For every tl << tz, there exists a unique quadratic spline s with a
(simple) knot at solving Problem 2.1. In particular, we can write

+B(t-tx)+Cl(t-tx) 2, t <t <,


(2.4) s(t)=
A.+B(t_)+C2(t_) j <-t <t2,
with
A1 =Zl, Bl=sl, Cl=(g-Sl)/2ce,
(2.5)
Az=A +Ba -I"C1 a2, B2 g, C2-- (Sz-g)/2fl,
where
2(z2-z,)-(asl +/3s2)
=s’()=
(t2-- ta)
(2.6)

Proof. It is easily checked that the function s defined in (2.4)-(2.6) is a quadratic


spline (to check this, one must check that s and its first derivative are both continuous
across the knot at ). It is also easy to verify that s satisfies the interpolation conditions
(2.1). Finally, the uniqueness of s follows from well-known zero theorems on splines
(see e.g. [18, Thm. 4.53]).
We now discuss the shape of the interpolating functions given in Lemmas 2.2
and 2.3. First we treat the special case of Lemma 2.2.
LEMMA 2.4. Suppose s x’s2 >=0, and that (2.2) holds. Then the quadratic poly-
nomial s in (2.3) which solves Problem 2.1 is monotone on I =[tx, t2]. Moreover, if
s < Sz, then s is convex on I, while if s > sz, then s is concave on L
Proofi Clearly s’ is linear on L It follows that s’(t) has the same sign as sl and
s z throughout L This establishes the monotonicity assertion. The assertion about
convexity (concavity) follows immediately from the fact that s"(t)=
(S2--Sl)/(t2--tl).
In the remainder of this section we suppose that (2.2) fails, and discuss the shape
of the spline s in (2.4). Clearly a necessary condition for monotonicity of s is that
s s2->_ 0. We now give a sufficient condition.
LEMMA 2.5. Suppose that s s2 >= O. Then the spline (2.4) is monotone on I It1, tEl
if and only if s 1" g >--O. This condition can also be written as
(2.7) 2(ZE-Z)>-(-t)s+(tz-)s2 if sl, s2_-> 0,
(2.8) 2(z2-zl)<-(-tl)Sl+(t2-)s2 if sl, s2_-<0.
856 LARRY L. SCHUMAKER

Proof.Since s’ is piecewise linear, s’(t) has one sign throughout I if and only if
sl, s2, and g all have the same sign. 71
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

Our next lemma deals with the convexity of s.


LEMMA 2.6. Suppose that s < s2. Then the spline s in (2.4) is convex on I [q, t2]
if and only if

(2.9) s <= g <= Sz.


Similarly, if s > s z, then s is concave on I if and only if
(2.10) S2gS1.

Proof. Since

tl <-_t <,
s"(t =t’ <=t <----t2’
[tz-’
the assertion is obvious.
Although Lemma 2.3 shows that the two-point Hermite interpolation problem
can be solved by a quadratic spline with one knot placed arbitrarily in the interval
(tl, tz), it is not possible to satisfy conditions (2.9) and (2.10) for arbitrary knot locations.
The following lemma shows exactly which knot locations lead to convex or concave
splines.
LEMMA 2.7. Let 6 (z2-z1)/(t2-tl). Then (S2--6)(Sl--6) 0 implies that s must
have an inflection point in the interval I. Suppose now that (SE-6)(sl-6)< 0. Then
the condition Is - l ISl- l implies that for all satisfying
2(tz-tl)(sz-6)
(2.11) tl<’-<: with tl +
($2--$1)
the interpolating spline s in (2.4) satisfies

s is convex on lif sl
(2.12)
s is concave on I if s
> S2.
If sis2 >- O, then s is also monotone. Similarly, if [s2-6[ > [s1-6[, then for all satisfying
2(tz-tl)(sl-6)
(2.13) _-<’<t2 with =t2+
(s-s)
the interpolating spline s satisfies (2.12). If slsz >-0, then s is also monotone.
Proof. It is easy to check that if (sz-6)(sl-6)>=O, then conditions (2.9)-(2.10)
fail, and s cannot be convex or concave on L Now for the converse, consider the case
SI<S2 and Is2-l<lSl-l. First we note that in this case tl<<t2. Now some
computation shows that if tl < "-<’, then (2.9) follows, which by Lemma 2.6 assures
that s is convex on L This, coupled with Lemma 2.5, shows that s is monotone when
sis2 => 0. The other cases are similar. !-1
3. A general curve fitting algorithm. We now describe a general curve fitting
algorithm for solving the interpolation Problem 1.1 using quadratic splines.
SHAPE PRESERVING QUADRATIC SPLINE INTERPOLATION 857

ALGORITHM 3.1.
1. (INPUT)
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

n number of data points


{tl}i, {Zi}i, data
2. Either input or compute {s,.}’
3. Fori=lstepluntiln-1
Use Lemma 2.2 to decide if a knot is needed in the interval Ii =[ti, t/l],
and insert one if needed.
Use Lemma 2.3 to compute the coefficients of the polynomial pieces associ-
ated with each knot.
4. (OUTPUT)

{xi}, the knots


,
k number of knots

{Ai, Bi, Ci}l the coefficients of the polynomial pieces.


Discussion. This algorithm produces the coefficients of a piecewise-polynomial
representation of a quadratic spline s solving Problem 2.1. In particular, we have
(3.1) s(t)={Ai +ti(t-xi)+Ci(t-xi) 2, Xi <=t <x+l, 1, 2,..., k.
This is a convenient form for storing s. The values of s and its derivatives at any point
are easily calculated using Horner’s scheme. 71
We now discuss how this algorithm can be made to produce a quadratic interpolat-
ing spline which preserves the shape of the data. Throughout the following discussion
we shall use the notation I [t, ti+l] and
Zi+l
8i =, 1,2,... ,n-1.
ti+--ti
If a knot has been inserted in the interval Ig, we denote it by ’.
Monotonicity. Lemmas 2.4 and 2.5 show how Algorithm 3.1 can be made to
produce a spline s which is locally monotone. In particular, to guarantee that s is
monotone on Ii, we must first make sure that si’si+a >=0. In addition, if a knot ’i is
inserted in the interval I, then we must also require that
2(Zi +1 Zi (i ti )Si (ti + i )Si +
(3.2)
(ti+l--ti)
has the same sign as Si and Si+l. If (Si--i)(Si+l--ti)O, in order to insure (3.2) we
must restrict the size of si and si+a, depending on the location of sci. In particular, we
need
(3.3) 21zi+1- zi e [(:i- ti )si "+" (ti+l- i )Si + x].
These conditions show how to make s monotone in the interval I. If the data is
globally monotone, i.e., Z < z2 <’" < zn, then by selecting the slopes {si}’ correctly,
we can make s globally monotone also.
Co-monotonicity. Often a data set will not be globally monotone, but instead
switches back and forth between monotone increasing and monotone decreasing.
Because of the local nature of the quadratic spline s constructed in Algorithm 3.1,
by choosing the slopes correctly, we can make s follow the shape of the data in the
following sense’
s is monotone increasing on Ii if Zi < Zi+l,
(3.4)
s is monotone decreasing on Ii if z > zi+.
858 LARRY L. SCHUMAKER

When s has this property, we say that s is co-monotone with the data. It is clear that
in order to achieve co-monotonicity, we must choose the slopes to assure local
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

monotonicity, and in addition, we must insure that


(3.5) si 0 when 8i-1 8i <= O.
Convexity. Lemmas 2.6 and 2.7 can be used to make Algorithm 3.1 produce a
spline s which is locally convex or concave in intervals Ii with (si-8)(si/1-8i) < 0. In
particular, to make s convex on the interval Ii, we need only make sure that condition
(2.9) holds, while for concavity we need condition (2.10). These conditions can be
guaranteed by choosing the knot i in the interval Ii, according to Lemma 2.7, i.e.,
satisfying
2(ti+l ti)(Si+ i)
(3.6) ti < i =< ti + if Isi+l-i{ < Isi -6i[,
(Si+1 Si)
2(ti+l--ti)(Si--i)
(3.7) ti+l if Isi +1 i > [Si ai 1,
(Si+l--Si)
respectively. If the data is globally convex, i.e., 61 <62 <’’’ <6n, then by choosing
s < s2 <’ < s, in such a way that s is locally convex in each subinterval, it will follow
that s is globally convex. (A similar assertion holds for global concavity.)
Co-convexity. A data set may switch back and forth between convexity and
concavity. In this case, it would be desirable to make s have a similar behavior. We
can accomplish this by making s be locally convex or concave as needed. For example,
suppose that 61 <" < 6 > 61+1 3> 6n-1. Then by choosing the slopes such that
sl<s2<"’<Sl, s+l>’">s,-1 and the conditions (3.6) are satisfied for i=
1, 2,..., l-l, while (3.7) are satisfied for =l+l,..., n-l, we obtain a spline
such that s is convex on [tl, t] and concave on [t/+l, tn]. In this case we say that s is
co-convex with the data. (Note that in this example, s must have an inflection point
in the interval [tg, tt+l]mindeed, otherwise it could not switch from convex to concave.)
Linear segments. Sometimes a number of consecutive data points will lie on a
straight line; e.g., we might have 6 6r- =6. In this case it may be desirable
to insure that s not only goes through the data points (ti, zi), l,..., r, but also to
insure that s is in fact linear on [tl, tr]. This can be accomplished by choosing the slopes
such that Sl Sr 6.
We conclude this section by observing two further properties of Algorithm 3.1.
Both are due to the local nature of the quadratic spline which is being constructed.
Adfusting one data value. If a spline fit s has been calculated for a given set of
data {ti, zi}’, and it is desired to change the ith data point (by changing zi and/or by
moving ti to another point between ti-1 and ti+l), then it is not necessary to recalculate
all of the coefficients of a new spline fit. Indeed, we need only consider the interpolation
problem on [ti-1, ti+l], and then mesh the new knots and coefficients with the ones
we already have.
Extending the data. There are some applications where the data comes to us in
a continuous stream (for example, from telemetering equipment). In this case we
cannot wait until all the data is in to perform a fitminstead we must perform a running
fit. Algorithm 3.1 is well-suited for this task. Having computed a fit to the first n data,
we can fit additional data without recomputing the knots and coefficients of the spline
which has already been computed.
4. A specific algorithm. In this section we describe a specific algorithm for solving
Problem 2.1 using quadratic splines. The algorithm is based on Algorithm 3.1, and
SHAPE PRESERVING QUADRATIC SPLINE INTERPOLATION 859

is designed to preserve the shape of the data. While it can be used as a one pass
algorithm, it can also be integrated into an interactive package where it would serve
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

as a first pass. The user then could interactively adjust the slopes and knot locations
in order to alter the shape of the interpolating curve as desired. We say more about
how to set up this interactive package later in this section.
ALGORITHM 4.1.
1. Preprocessing
For 1 step 1 until n -1,
z
Li [(ti+x ti) + (zi+ zi)2] 1/2
i (Zi+l zi)/(ti+l ti)
For 1 step 1 until n 1,
L Y, Li, where st,_1 st, s, : s,+
2. Slope calculations
For 2 step 1 until n 1,
si (Li-x6i-x + Li6i)/(Li-x + Li).
3. Left end slope
s1=(361-sz)/2
4. Right end slope
s, =(36,-1-s,-1)/2
5. Compute knots and coefficients

For 1 step 1 until n- 1,


if s + Si+l 26i
f :f + 1, xi ti, A Zi, Bi si, C] (Si+l--Si)/2(ti+l--ti)
else
a si i, b si + i
if ab >= 0
i=(ti+l+ti)/2
else
if [a[>lbl
i ti+x +a(ti+-ti)/(si+-si)
else
jiti +b(ti+x-ti)/(si+l-si)
s- (26i si+ l) + (Si+l si )(ji ti / ti + ti
ni (i Si)/ (i ti)
] f + 1, xi ti, Ai zi, Bi Si, C] rill2
f ] + 1, Xi i, Ai zi + si(ji ti) + rti(i ti)/2
Bi g,, C" (s,+l-g,)/2(ti+x-,).
Discussion. The slope si at the point ti is computed as a weighted average of 6-1
and 6i, where the weights are taken to be the quantities L-I and L (which at this
point have the lengths of the longest lines containing the chords in Ii-x and Ii,
respectively). In particular, if i 6i-1, then S --6i "-6i-1. The slope s is taken to be
an average of 61 and sz. Similarly, the slope s, is taken to be an average of 6,-1 and
Sn-1.
The choice of knots in those intervals where they are required is made in such
a way as to assure local monotonicity and local convexity (or concavity). In particular,
when a si- 6i and b si+l- 6i satisfy ab >= O, then we are free to choose :i anywhere
in the interval Ii; we take the midpoint. When ab < 0, we take :i to be the midpoint
of the allowed interval (see Lemma 2.7 for the definition of this interval). Note that
860 LARRY L. SCHUMAKER

in this case it may happen that condition (3.3) guaranteeing local monotonicity will
fail. This can be corrected later in the interactive stage.
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

Algorithm 4.1 is designed to produce a quadratic spline with the following


features:
s is continuously differentiable.
s is co-convex with the data, in the sense that it has inflection points only in
those intervals where the data transitions from convex to concave or vice versa.
s is co-monotone with the data with the possible exception of those intervals
where s has an inflection point.
We conclude this section with some remarks on how Algorithm 4.1 can be
integrated into an interactive system in which the user has considerable flexibility in
adjusting the shape of the interpolating spline. The general structure of such an
interactive system is shown in the flow chart in Fig. 1.
Ad]usting slopes. The user is free to adjust the slope at each data point. In doing
so, he should keep the following relationships between the value of si and the shape

[ Adjust Knot.,?, lput., !: .,i]

[Redo S’tep 5 of Alg. 4.1]

-orn.er Insert
s. a corner]

,1

FIG. 1. An interactive curve package.


SHAPE PRESERVING QUADRATIC SPLINE INTERPOLATION 861

of s in mind"
A necessary condition for monotonicity on Ii_ is that SiSi-1 Oo
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

A necessary condition for monotonicity on Ii is that sisg/l >-O.


A necessary condition for monotonicity on both Ii and Ii- in the case where
6i6g-1 -< 0 is that si O.
Condition (3.3) is necessary to assure monotonicity on an interval Ii where s
has an inflection point.
Ad]usting knots. The user is also free to adjust the location of the knot :g in each
interval Ii where one is required. In choosing knots, he should keep the following
facts in mind"
i can be chosen anywhere in (ti, ti+l) when aibi>-O, where ai--si--Si and
bi Si+l--ti.
sci can be chosen anywhere in the interval (3.6) when aib < 0 and
sci can be chosen anywhere in the interval (3.7) when aibi < 0 and Ibil > lail.
Inserting corners. Suppose that for some l, i, r, 6t 6i-1 8i r. Then
the point where the line drawn through the data points at tl,’", ti meets
(ti, zi) is
with the line through the data at ti," ", t, In some cases it may be desirable to make
our fit s fit these lines exactly. Since Algorithm 4.1 will not produce such a fit (the
slope at ti is an average of i- and 6i), if we want a corner at ti, we must insert it
interactively. This is a simple matter of dropping the knots in Ii_ and Ii, and adjusting
a few coefficients. The quadratic spline which results is now only continuous at ti,
rather than differentiable. We can think of ti as a double knot of the spline.
5. Numerical examples. Algorithm 4.1 and an interactive package based on the
flow chart of Fig. 1 were prepared in FORTRAN and tested on a variety of numerical
examples. In this section we present two typical data fitting problems to illustrate the
flexibility of the package.
Example 5.1. Let n 5, and suppose the t’s and z’s are given by

2 3 4 5

z 2 3 2

Discussion. The data and the spline s produced by Algorithm 4.1 are shown in
Fig. 2a. Note that the slope at t3 3 has been chosen to be 0, and that s is co-monotone
with the data. In Fig. 2b we show the quadratic spline which results when the slope
at t3 is changed to 1, forcing the spline to be linear throughout [1, 3]. In this case, s
is no longer monotone on [3, 4]. Finally, in Fig. 2c we show the quadratic spline s
which results when we make the point t3 be a corner (or double knot).
Example 5.2. Let n 11, and suppose the t’s and z’s are given by

0 2 3 5 6 8 9 11 12 14 15

10 10 10 10 10.5 15 50 60 85

Discussion. This data is taken from Akima [1]. For the results of some other
spline fits, see [10]. The data and the spline s produced by Algorithm 4.1 are shown
862 LARRY L. SCHUMAKER
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

a).

4 0 2 3 4 5

c).

0 2 3 4 5

FIG. 2. The splines in Example 5.1.

in Fig. 3a. The slopes selected by the algorithm are

0 2 3 5 6 8 9 11 12 14 15

0 0 0 0 0 .061 1.92 30.96 28.23 19.21 27.85

The algorithm inserts knots at {7, 8.76, 10.977, 11.5, 13, 14.33}. Note that although
the data is monotone increasing, the spline s fails to be monotone in the interval [12,
14]. This is due to the fact that the selected slopes at 12 and 14 are too large. Also
note the slight dip in 17, 8].
In Fig. 3b we show the spline which results when the slopes at 12 and 14 are
reduced to 11 and 8, respectively. This reduction is enough to assure that (3.3) is
satisfied, and the spline becomes monotone increasing on [12, 14]. Its shape is changed
only slightly outside this interval.
Fig. 3c shows the result of setting the slope at 8 to be 10. This forces the
interpolating spline to be linear throughout the interval [0, 8].
6. Remarks.
1. Algorithm 4.1 presented here can be thought of as an alternative to the method
of McAllister and Roulier [12]-[13]. The main differencesbetween the two are in the
way in which the slopes and knots are selected. Their slope and knot assignments are
based on a geometrical argument, and the quadratic polynomial pieces are constructed
using Bernstein polynomials. Whichever algorithm is used as a first pass, the main
idea of this paper is that there is considerable flexibility in the use of quadratic splines,
and that this flexibility should be exploited in an interactive mode.
2. In [12]-[13], there is some discussion of "pathological cases" where a decision
based on comparing two numbers can make a substantial change in the shape of the
fit. Algorithm 4.1 produces a spline fit s which depends continuously on the data.
The location of a knot in an interval Ii may be a discontinuous function of the data.
SHAPE PRESERVING QUADRATIC SPLINE INTERPOLATION 863

100
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

a).
50

0 2 3 5 6 8 9 10 12 14 15

100

b).
50

0 2 3 5 6 8 9 10 12 14 15

100

c).
50

0 2 3 5 6 8 9 10 12 14 15
FIG. 3. The splines in Example 5.2.

In particular, if (si-Si) and (s/1-8) are nearly the same, then the choice of a knot
in I will depend on which of these is greater, and indeed, if they are equal, no knot
will be inserted at all. Still, the final s will be nearly the same in all cases. I suggest
that in coding the algorithm that the quantities be regarded as equal whenever they
differ by no more than some prescribed small e--this saves adding knots where they
really are not needed.
3. Fritsch and Carlson [10] have published a curve fitting algorithm based on
cubic splines, which is capable of producing monotone fits to monotone data. It does
not preserve convexity, however.
4. Additional references and examples can be found in the papers listed below.
For some unusual applications of shape preserving algorithms, see [6], [15].

REFERENCES
[1] H. AKIMA, A new method of interpolation and smooth curve fitting based on local procedures, J. Assoc.
Comput. Mach., 17 (1970), pp. 589-602.
[2] C. DE BOOR, A Practical Guide to Splines, Springer-Verlag, New York, 1978.
[3] C. DE BOOR AND B. SWARTZ, Piecewise monotone interpolation, J. Approx. Theory, 21" (1977),
pp. 411-416.
864 LARRY L. SCHUMAKER

[4] J. BUTLAND, A method of interpolating reasonable-shaped curves through any data, Proc. Computer
Graphics 80, Online Publications Ltd., Middlesex, UK, 1980, pp. 409--422.
Downloaded 12/29/12 to 132.206.27.25. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

[5] A. K. CLINE, Scalar- and planar-valued curve fitting using splines under tension, Comm. ACM, 17
(1974), pp. 218-223.
[6] L. E. DEIMEL, C. L. Doss, R. J. FORNARO, D. F. MCALLISTER AND J. A. ROULIER, Application
of shape-preserving spline interpolationto interactive editing of photogrammetric data, Proc. SIG-
GRAPH 78, 12 (1978), pp. 93-99.
[7] L. E. DEIMEL, D. F. MCALLISTER AND J. A. ROULIER, Smooth curve fitting with shape preservation
using osculatory quadratic splines, Proc. lth Annual Conference on the Interface Between
Statistics and Computer Science, 1978, pp. 343-347.
[8] R. P. DUBE, Univariate blending functions and alternatives, Computer Graphics and Image Processing,
6 (1977), pp. 394-408.
[9] T. M. R. ELLIS AND D. H. MCLAIN, Algorithm 514. A new method ofcubic curve fitting using local
data, CM Trans. Math. Software, 3 (1977), pp. 175-178.
[10] F. N. FRITSCH AND R. E. CARLSON, Monotone piecewise cubic interpolation, this Journal, 17 (1980),
pp. 238-246.
[11] D. F. MCALLISTER AND J. m. ROULIER, Interpolation by convex quadratic splines, Math. Comput.,
32 (1978), pp. 1154-1162.
[12]., An algorithm for computing a shape-preserving osculatory quadratic spline, ACM Trans. Math.
Software, 7 (1981), pp. 331-347.
[13] , Algorithm 574. Shape-preserving osculatory quadratic splines, ACM Trans. Math. Software,
7 (1981), pp. 384-386.
[14] D. F. MCALLISTER, E. PASSOW AND J. A. ROULIER, Algorithms for computing shape preserving
spline interpolations to data, Math. Comp., 31 (1971), pp. 717-725.
[15] D. F. MCALLISTER, J. A. ROULER AND M. EVANS, Generation of random numbers using shape
preserving quadratic splines, Proc. 16th Ann. Southeast Regional ACM Conf. (1978), pp. 216-218.
[16] E. PASSOW, Piecewise monotone spline interpolation, J. Approx. Th., 12 (1974), pp. 240-241.
[17] E. PASSOW AND J. A. ROULIER, Monotone and convex sptine interpolation, SIAM J. Numer. Anal.,
14 (1977), pp. 904-909.
[18] t. L. SCHUMAKER, Spline Functions: Basic Theory, Wiley-Interscience, New York, 1981.
[19] S. W. YOUNG, Piecewise monotone polynomial interpolation, Bull. Amer. Math. Soc., 73 (1967),
pp. 642-643.

You might also like