BASES FOR SHAPE PRESERVING CURVES

. The shape preserving properties of a curve in R 2 depend on the properties of the function basis we use in its representation. Both sign consistent and totally positive bases have shape preserving properties useful in Computer Aided Geometric Design. Some of the most useful properties are lightened and some examples of shape preserving bases are given.


INTRODUCTION
In Computer Aided Geometric Design (CAGD) it is useful to be able to predict or control the shape of a curve by studying or specifying the shape of the control polygonal arc formed by certain points which define the curve, typically the coefficients when the curve is expressed in terms of a particular basis.This is possible when we choose as a basis a system of functions Φ = (ϕ 0 , . . ., ϕ n ) with suitable shape preserving properties.This means that the geometrical properties of the curve in R 2 (1. 1) γ(x) = n i=0 P i ϕ i (x), x ∈ I ⊂ R, constructed on the control points P i ∈ R 2 , i = 0, . . ., n, are implied by the geometrical properties of the control polygon P 0 . . .P n .The shape preserving properties of each representation (1.1) depend on the characteristic of the system (ϕ 0 , . . ., ϕ n ).
For instance, a simple property which is demanded for curve control is the convex hull property, that is, the points of the curve always lie inside the convex hull of the control polygon.It is well known that γ has the convex hull property if and only if all functions ϕ i are nonnegative and add up to one, that is This kind of systems are usually called normalized (or blending) systems.
Most normalized systems used in CAGD for curve generation are totally positive (TP) systems, that is the collocation matrix (1.3) M ϕ 0 , . . ., ϕ n x 0 , . . ., x m := (ϕ i (x j )) n m i=0 j=0 for any sequence x 0 < . . .< x m , x i ∈ I, i = 0, . . ., m, is totally positive, i.e. all its minors are non-negative.The properties of totally positive matrices and systems are extensively studied in [18], while several applications of total positivity can be found in [12].
A system of totally positive functions (ϕ 0 , . . ., ϕ n ) that add to one, is called normalized totally positive (NTP) system.Thus, the collocation matrix (1.3) is TP and stochastic (each row has sum 1).
The importance of TP bases follows from their good shape preserving properties which, in turn, are consequence of the variation diminishing (VD) property of the corresponding totally positive collocation matrix (1.3) (see, for instance, [13]).In fact, if T is a TP matrix and v is any vector for which T v is defined, the variation diminishing property states that where S − (v) denotes the number of strict sign changes in v [18, Ch. 5, §1].
The VD property is stronger than many other shape properties, such as monotonicity or convexity preservation.
For instance, a relevant property of collocation matrices which is weaker than total positivity is sign consistency.A matrix is said to be sign-consistent of order k (SC k ) if all minors of order k have the same nonstrict sign (which may depend on k).A system of functions whose collocation matrices are signconsistent is a Descartes system, thus, in particular, every TP system is a Descartes system.The importance of sign-consistent system in CAGD is in that they are the unique systems which satisfy the VD property [7,Prop. 2.6].In Chapter 5 of [18] the sign consistency property is analysed in connection with the VD property.
Another usual requirement for curve control in CAGD is the end-point interpolation condition, that is the first control point always coincides with the start-point of the curve generated by the function system and the last control point always coincides with the end-point of the curve.
In [19] it was shown that a normalized Descartes system enjoys the endpoint interpolation condition if and only if it is a TP system.
From the results above it follows that if a system of functions, starting from any given set of control points, generates curves of type (1.1) satisfying the convex hull, the variation diminishing and the end-point interpolation properties simultaneously, then it is a NTP system.
The aim of the present article is to collect some recent results on shape preserving bases commonly used in CAGD.Some examples of these bases are reported in Section 2. Section 3 deals with shape preserving properties implied by sign consistency, while Section 4 is devoted to properties implied by the VD property of NTP systems.In order to deduce further shape preserving properties, in Section 5 the corner cutting algorithm is lightened.Finally, in Section 6 the optimality properties of some special bases are considered.

SOME BASES USED IN CAGD APPLICATIONS
When defining a curve or surface from a given finite dimensional space of functions, it is important which basis we use.As a simple example, consider the space of polynomials of degree n on [a, b].In the representation (2.1) the coefficients c i do not give information on the shape of the curve p.However, if we write then the coefficients d i give a great deal of information about the shape of the curve p.To give just an example, we note that if the sequence (d 0 , . . ., d n ) is increasing, then p is increasing.The representation (2.2) introduces a basis commonly used in CAGD applications, we mean the Bernstein basis l i , i = 0, . . ., n, for the space P n of polynomials of degree n on [a, b]: using this basis, the polynomial p(x) becomes: (2.4) This representation is called the Bézier representation, after P. Bézier, who used it in the design of cars (although it was actually used earlier by P. de Casteljou for a rival car manufacturer).The control points B i ∈ R 2 , i = 0, . . ., n, and the control polygon B 0 . . .B n are referred to as Bézier points and Bézier polygon respectively.From the Descartes' rules of sign for polynomials it follows that the number of times that a straight line crosses the curve p in (2.2) is no more than the number of times it crosses the polygonal arc P 0 . . .P n [13].Some simple consequences of this property are that the Bézier representation preserves monotonicity and convexity, that is the shape of the curve γ closely mimics the shape of the Bézier polygon.
However, for CAGD, polynomials are often too inflexible, and it is better to use other functions, for instance spline functions.A simple TP basis for the space of polynomial splines is given by the truncated power [18] (2.5) for any x 0 ≤ . . .≤ x m , n ≥ 0.More convenient from a computational point of view, since they have compact support, are B-splines (see, for instance, [20]) which is constructed as follows.
Take m ≥ 0, n ≥ 2 and a sequence x 0 ≤ x 1 ≤ . . .≤ x m+n+1 with x i < x i+n+1 , i = 0, . . ., m.Then for i = 0, . . ., m, let N n i be the B-spline of degree n with knots at x i , . . ., x i+n+1 ; i.e., a function (unique up a positive multiple) which has support [x i , x i+n+1 ], is a polynomial of degree n on any interval [x j , x j+1 ), and at x j has continuous derivatives up to order n − |{l : x l = x j }|.
(By |S| we mean the number of elements in S.) Then (N n 0 , . . ., N n m ) is a TP systems [18].Henceforward we assume that m ≥ n and x 0 = . . .

after suitable normalization, to the Bernstein basis (2.3).
Other TP bases can be obtained by keeping algebraic polynomials on the intervals [x j , x j+1 ), but changing the continuity conditions on the knots x j .A general condition at a knot ξ can be expressed as r,r i,j=0,0 at each knot is TP and non-singular, then one can construct a basis of functions (sometimes called β-splines) with the same supports as the usual B-splines and this basis is TP [9].Such bases may be useful for CAGD when the condition (2.6) at each knot is chosen so that a curve defined parametrically from this basis has geometric continuity of order higher than the continuity of the separate components.For instance, cubic β-splines, first introduced in [1] and [10], give a curve with continuous unit tangent vector and curvature vector, even though the separate components need not have continuous first and second order derivatives.Other examples of β-splines can be found in [15].
Finally, we mention the nonuniform rational B-spline (NURBS) curve.
For any given set of positive weights (w 0 , . . ., w n ) and a control polygon P 0 . . .P n , the NURBS curve is defined by [11] (2.7) The functions consitute a basis of the vectorial space containing all the curves of type (2.7).We shall see in Section 4 that TP bases enjoy many useful shape preserving properties.

MONOTONICITY AND CONVEXITY PRESERVING PROPERTIES
In this section we shall analyze the shape preserving properties that follow from the weaker assumption that (ϕ 0 , . . ., ϕ n ) is a sign-consistent system (cf.[2]).
Let us denote by SC k + the subclass of SC k matrices with all minors of order k being nonnegative.A system of functions is SC k + if all its collocation matrices are SC k + .All the shape preserving properties in the following are consequence of the fact that a SC k + system preserves the orientation of the control polygon.
Definition 1.We say that a polygon P 0 . . .P n , + .In Theorem 3 of [2] it was shown that a system is SC s + if and only if the curve γ is positively oriented when the control polygon P 0 . . .P n is positively oriented.
oriented, and a polygon P 0 , . . ., P n is turning counterclockwise around a point v if P 0 − v, . . ., P n − v is positive oriented.
A system is said to be monotonicity preserving if i c i ϕ i is an increasing function, for any c 0 ≤ . . .≤ c n , and it is said to preserve the sense of rotation if it transforms polygons turning counterclockwise around a point into curves turning counterclockwise around the same point.A normalized system is monotonicity preserving and preserves the sense of rotation if and only if it is SC 2 + [2, Props.6 and 8].
Monotonicity preserving normalized systems have the following geometrical interpretation.If the projection of the control polygon onto a given line is increasing, then the projection of the curve γ on the same line is increasing.Observe that the preservation of the sense of rotation implies the preservation of the monotonicity.
Probably, the most useful shape preserving property is the convexity preservation.In [13] a convex planar curve (or polygon) is described as a curve (or polygon) such that any line of the plane crosses the curve at most twice.In that paper, it was shown that if the system (ϕ 0 , . . ., ϕ n ) enjoys the VD property then the curves generated by convex polygons have to be convex.Following [2], here we want to consider a stronger kind of convexity.Local convexity is not preserved by the most common curves, unless some limitations on the number of turns of the polygon are imposed [14].
The most common examples of curves used in CAGD (see Sect. 2) are generated by normalized systems which are totally positive and, in particular, SC k + for all k ≤ n.Therefore, all these systems are monotonicity and global convexity preserving.

GENERALIZED VARIATION DIMINISHING PROPERTY
In [3] a generalization of the variation diminishing property (1.4) was given as follows.
For an n × r matrix A = (a ij ) n−1 r−1 i=0 j=0 , we let S − r (A) denote the number of strict sign changes in the sequence of consecutive r × r minors of A. To be precise, if we write Definition 4. We say a TP matrix T = (T ij ) m r i=0 j=0 is p-restricted if any consecutive rows of rank p vanish outside some p consecutive columns.Definition 5. We say an n × r matrix A is regular of order p, where r + 1 ≤ p ≤ n, if for any i, 0 ≤ i ≤ n − p, there is an r × (r − 1) matrix R i such that all minors of order r − 1 from rows i + 1, . . ., i + p of AR i are strictly positive.
Theorem 6 (CGP).[3,Th. 3.7].Let T be an m × n totally positive matrix of rank n which is p-restricted.Let A be an n × r matrix which is regular of order p with Then . By Definition 5 it follows that if p = r there are no conditions on A. As p increases, the conditions on A becomes more restrictive but, because of Definition 4, the conditions on T relax until they become vacuous when p = n.
In the following we shall show some applications of (4.3) on the shape preserving properties of a curve [3], [15].
Example 1.Take r = 2 in (4.3) and (4.6) In this case A is regular of order n + 1 and so the condition (4.2) that T be (n + 1)-restricted is vacuous.Since each minor 1 a i 1 a i+1 = a i+1 − a i , then S − 2 (A) denotes the number of local extrema in the sequence (a 0 , . . ., a n ), i.e. the number of local maximum and local minimum which occurs if If T is stochastic, then we can write (4.7) and so (4.3) tells us that the number of local extrema in the sequence T a is bounded by that in the sequence (a 0 , . . ., a n ).In particular, if (ϕ 0 , . . ., ϕ n ) is a NTP basis, then the number of local extrema of the function n i=0 a i ϕ i is bounded by the number of local extrema in the sequence (a 0 , . . ., a n ).Moreover, if the function f is the continuous limit curve of a subdivision procedure, then the number of local extrema of f is bounded by the number of local extrema in the initial sequence.
Example 2. Take r = 3 in (4.3) and (4.8) where P i = (x i , y i ), i = 0, . . ., n.In this case A is regular of order p if any p consecutive points P i+1 , . . ., P i+p are strictly increasing in some direction or rotate in strictly the same direction about some point through an angle less than π.Now, suppose that T , as in Theorem CGP, is stochastic and take r = 2 in (4.3) and (4.9) 3) tell us that the number of inflections in the polygonal arc Q 0 , . . ., Q m (i.e. the number of times the the curves changes from turning in a clockwise direction to turning in an anti-clockwise direction, or vice-versa), is bounded by the number of inflections in the polygonal arc P 0 , . . ., P n .This shows, in particular, that for a normalized totally positive basis (ϕ 0 , . . ., ϕ n ), the number of inflections in the curve n i=0 P i ϕ i is bounded by the number of inflections in the polygonal arc P 0 , . . ., P n , under the above conditions on the points P 0 , . . ., P n in R 2 .Similarly we can gain a bound on the number of inflections in a curve derived as a limit of a suitable subdivision scheme.For the special case of a totally positive basis of B-splines, this example was studied in [14].
In conclusion, we can say that if (ϕ 0 , . . ., ϕ n ) is NTP, then in many ways the shape of the curve γ(x) mimics the shape of the control polygon P 0 . . .P n .

CORNER CUTTING ALGORITHM
In the functional space generated by a given NTP basis (ϕ 0 , . . ., ϕ n ) one can consider a new NTP basis (b 0 , . . ., b n ); then, the curve γ in (1.1) can be express in term of both bases: where Q 0 . . .Q n is the control polygon with respect to the new basis.If K is the TP matrix relating the two bases, that is then K is also the matrix that relates the control polygons of γ: When K is TP and stochastic the relation between both control polygons corresponds to a corner cutting algorithm [16], that is a rule for successively cutting corners of the polygon P 0 . . .P n .
A corner cutting algorithm is any composition of elementary corner cuttings.Observe that the ratio µ/(1 − µ) at which each side of the polygonal arc is divided at each step is independent of the polygonal arc.
A corner cutting algorithm allows one to deduce further shape preserving properties of the curve γ.For instance, the best known example of corner cutting algorithm is given by the de Casteljau algorithm [8], obtained when the NTP basis is the Bernstein basis (2.3).In this case the following properties of P 0 . . .P n and Q 0 . . .Q n can be obtained [4]: (i) if P 0 . . .P n is convex, then so are Q 0 . . .Q n and the curve γ, and Q 0 . . .Q n lies between P 0 . . .P n and γ; (ii) length γ ≤ length Q 0 . . .Q n ≤ length P 0 . . .P n ; (iii) if P 0 . . .P n turns through an angle ≤ π, then I(γ) ≤ I(Q 0 . . .Q n ) ≤ I(P 0 . . .P n ), where I(β) denotes the number of inflection of a curve β, as defined in Ex. 2 of Sect.4; (iv) Let θ(β) denotes the angular variation of a continuous curve β(x), a ≤ x ≤ b, that is the sup θ(β(x 0 ) . . .β(x m )), where the supremum is taken over all a ≤ x 0 < . . .< x m ≤ 1 for all m.There results From the properties above it follows that the control polygon Q 0 . . .Q n with respect to the Bernstein basis is more similar to the curve γ than the control polygon P 0 . . .P n with respect to any other reasonable basis, that is the Bernstein basis has optimal shape preserving properties.
It is natural to wonder if there exist other functional spaces endowed with optimal bases, that is bases satisfying properties (i)-(iv).The search and the construction of optimal bases is the subject of the following section.

B-BASES AND OPTIMALITY PROPERTIES
Given a TP basis (b 0 , . . ., b n ) of a functional space and a non singular TP (n + 1) × (n + 1) matrix K, the system (6.1)(ϕ 0 , . . ., ϕ n ) = (b 0 , . . ., b n )K is also a TP basis of the same space.Thus, we may construct a family of TP bases from a given one, but not necessarily all TP bases.If we obtain by this process all the TP bases we say that (b 0 , . . ., b n ) is a B-basis.A B-basis also allows one to obtain all sign-consistent bases if we choose in (6.1) a nonsingular sign-consistent matrix K [7, Th.

2.3].
A useful test to check if a TP basis is a B-basis is given by the following proposition.
Proposition T. [5,Th. 3.12].Let (b 0 , . . ., b n ) be a TP basis of a space .Then (b 0 , . . ., b n ) is a B-basis if and only if the following conditions hold: for all i = j.
If the check fails, we can always transform any given TP basis (ϕ 0 , . . ., ϕ n ) of a functional space into a B-basis (b 0 , . . ., b n ) [5,Th. 3.6].Moreover, if the TP basis (ϕ 0 , . . ., ϕ n ) is normalizable, that is n i=0 ϕ i (x) > 0 for all x ∈ I, then the basis (6.3) is a NTP basis of the space W generated by (w 0 , . . ., w n ) and there exists a unique NTP B-basis from which we can recover all NTP bases in W , choosing in (6.1) a TP and stochastic matrix [5,Th. 4.2].
In addition to the previous ones, B-bases enjoy further shape preserving properties.First of all, NTP B-bases are least variation diminishing bases.In fact, observe that if Φ = (ϕ 0 , . . ., ϕ n ) and Z = (ζ 0 , . . ., ζ n ) are two bases satisfying the variation diminishing property and such that Φ = ZK with K sign-consistent, then Z is less variation diminishing than Φ.Thus a B-basis is less variation diminishing with respect to all sign-consistent bases of the same space.Moreover, if there exists a system of functions satisfying a Descartes' rule of sign, then there exists a B-basis which satisfies an optimal Descartes' rule in that the number of zeros of any function f in the space in the interval I is less than or equal to the strict changes of sign in the sequence of the coefficients with respect to the B-basis and this is in turn less than or equal to the number of strict changes of sign in the sequence of the coefficients with respect to any other basis satisfying the Descartes' rule [7].Therefore a basis is a normalized B-basis if and only if it satisfies the least variation diminishing, the endpoint interpolation and the convex hull properties simultaneously.
The unique normalized B-basis of a given space satisfy also the optimal shape preserving properties (i)-(iv) of Sect. 5. Thus a B-basis is an optimal basis [5,Prop. 3.11].
Finally, B-bases are optimal among all NTP bases in the sense that the curve or surface generated by a given set of control points enjoys many nice properties [6,Sect. 5].In particular, we quote the maximality of the convex cone of nonnegative functions generated by this basis, the good conditioning of the basis, the little support of the basic functions.Some examples of functional bases which are B-bases are: the Bernstein basis in the space of polynomials of degree less than or equal to n on a compact interval [4]; the monomial basis (1, t, . . ., t n ) of polynomials of degree less than or equal to n on the interval [0, ∞]; the B-spline basis in the corresponding space of polynomial splines [5,Sect. 4]; the β-spline basis in the space of polynomial generalized splines with geometric continuity conditions at the knots [5,Sect. 4]; the basis (2.8) used for generating NURBS curves [5,Sect. 4]; the B-bases constructed starting from totally positive scaling functions [17].
Observe that only B-spline bases, β-spline bases, rational B-spline bases, and the B-bases constructed in [17] are normalized and, as a consequence, optimal bases.
contained in a line is globally convex if h(γ) is positively oriented.A polygon P 0 . . .P n is globally convex if h(P 0 ) . . .h(P n ) is a positively oriented polygon.A system is said to be global convexity preserving if it transforms globally convex polygons into globally convex curves.If a normalized system of linearly independent functions is SC 3 + , then it is global convexity preserving [2, Prop.10].It is interesting to observe that if the projection of a curve on a line is strictly increasing, local convexity and global convexity are equivalent [2, Prop.11].