Line monotonic partitioning of planar cubic B-splines

Line monotonic partitioning of planar cubic B-splines

Comput. & GraphicsVol. 16, No. I, pp. 55-68, 1992 Printed in Great Britain. 0097-8493/92 $5.00 + .00 © 1992 Pergamon Press plc Technical Section LIN...

1MB Sizes 0 Downloads 27 Views

Comput. & GraphicsVol. 16, No. I, pp. 55-68, 1992 Printed in Great Britain.

0097-8493/92 $5.00 + .00 © 1992 Pergamon Press plc

Technical Section LINE M O N O T O N I C P A R T I T I O N I N G OF P L A N A R CUBIC B-SPLINES KAREN M. DANIELS Aiken Computation Laboratory, Harvard University, Cambridge, MA 02138 R. DANIEL BERGERON Department of Computer Science, Kingsbury Hall, University of New Hampshire, Durham, NH 03824 and GEORGES G. GRINSTEIN Institute for Visualization and Perception Research, Department of Computer Science, University of Massachusetts at Lowell, One University Avenue, Lowell, MA 01854 Abstract--This paper describes the line-monotonic partitioning of curves. A set of sufficientconditions for line-monotonicity is provided, along with a method for partitioning closed, periodic, planar, cubic B-splines into line-monotone pieces. A new B-splinecontrol polygon classificationis introduced as a framework for discussingB-spline shape behavior, extending and reinterpreting the work of Yates, Wang, and Su and Liu. Line-monotone pieces of cubic B-splinecurve segments are identified for each control polygon shape class. Every segment is either line-monotone, or can be partitioned into two line-monotone pieces, a result that extends to all parametric cubics. Line-monotonic partitioning of closed curves is useful in applications such as filling. examination of shape properties that influence linemonotonicity of uniform cubic B-splines, we present a control polygon classification. Then, for uniform cubic B-spline curve segments generated by our control polygon shape classes, we examine inflection points, cusps, and loops. Knowledge of these behaviors is used to partition a uniform cubic B-spline curve segment into pieces that satisfy our set of sufficient conditions for line-monotonicity. The section on flexible partitioning describes alternative approaches to partitioning based on convexity, and shows how to merge adjacent line-monotone pieces of a curve. Finally, we show how to utilize this classification technique with nonuniform rational B-splines (NURBS).

1. I N T R O D U C T I O N

This paper presents an efficient method for the partitioning of closed, periodic, planar, cubic B-spline curves into pieces that are monotonic with respect to a straight line. The partitioning process is efficient because shape properties of individual curve segments (such as cusps, loops, and inflection points) can be deduced from control polygon shape information. Definition 1: (Line-Monotone). A curve piece C is line-monotone if it is monotone with respect to a line. Cis monotone with respect to a straight line Mifpoints along the curve, when projected onto M in a direction orthogonal to M, retain their ordering. (Note: This extends the definition for monotonicity of a polygonal chain with respect to a line [ l ]. For example, both the curve of Fig. la and the chain of Fig. lb are monotone with respect to M.) The partitioned curve has many useful applications. For example, it can be supplied as input to a linemonotonic filling algorithm for flexible and efficient filling of the area enclosed by the curve (see [2]). Within the filling algorithm, as curve points are generated, they are projected onto a single edge of a polygon, creating trapezoids, as shown in Fig. 2. The direction of projection, or fill direction (heavy arrow in Fig. 2), for each line-monotone curve piece depends on the lines to which the curve piece is monotone. A partitioned curve can also serve as the starting point for an efficient iterative curve intersection algorithm (see [3]).

3. BACKGROUND AND RELATED

WORK

3.1. B-splines Each set of four consecutive points of a periodic cubic B-spline control polygon determines a segment of the curve. We consider the cubic B-spline curve segment which has a corresponding set of four distinct control points. Points along a curve segment are generated using a uniform periodic cubic B-spline formulation[4] with real parameter u, where u varies uniformly over the interval [0, 1]. The cubic B-spline curve has been discussed extensively in the literature (see, for example, [ 4-6 ]). Cubic B-splines exhibit both the convex hull property (each curve segment lies within the convex hull of its four control points) and the variation diminishing property (no straight line can intersect the curve more often than it does the control polygon). We also know [ 7 ] that the two endpoints of a cubic B-spline curve segment, as well as the tangents at those points, are easily obtained from the control polygon. The mathematics literature on curves and their

2. O V E R V I E W

After a brief review of related work, we present the theoretical foundation of our work, consisting of a set of sufficient conditions for line-monotonicity,together with a partitioning technique. In preparation for an 55

56

KAREN M. DANIELS, R. DANIEL BERGERON, and GEORGES G. GRINSTEIN

of the convexity of curve segments. Intuition in this domain is supported by the mathematics literature on convexity theory, (see, for example, [ 14-16 ] ). 4. SUFFICIENT CONDITIONS FOR LINEMONOTONICITY

(e) Curve ts monotone with reepoct to M.

(h) Ci'mln 1$monotone with rl~oect to I1.

Fig. 1. Line-monotone curve and polygonal chain. properties provides information about singular points of polynomial curves that are both continuous and differentiable. For example, Yates [ 8 ] examines a set of shape properties that includes cusps and nodes (points of self-intersection). From the curve's derivatives, Yates constructs a function F , for which comparison of a value of F against zero reveals the shape behavior of the curve. Wang [ 9 ] provides algebraic tests for the existence of inflection points, cusps, and loops in planar parametric cubic B-spline curve segments specified by four control points. He shows that the shape behaviors of cusp, loop, and two inflection points are mutually exclusive. Similar to the approach taken by Yates, Wang compares the value of a function built from derivatives of the cubic against zero to decide which shape behavior a curve exhibits. Wang begins with an analysis of shape characteristics for the general parametric cubic curve, and then examines the B-spline case. He proves that a B-spline curve segment has one inflection point if the first and fourth control points lie on opposite sides of the line segment determined by the second and third points. He also identifies conditions under which a curve segment has no cusp, loop, or inflection points. His work forms a starting point for our more detailed exploration of curve shape behavior based on control point configurations. Su and Liu[10, 1 I] provide a geometric interpretation of Wang's cusp, loop, and inflection point shape behavior results for the Bezier case. They introduce a characterization diagram that identifies a Bezier curve segment's shape behavior based on the location of a "characteristic point" with respect to a set of planar regions. Their characteristic point is a function of geometric characteristics of the Bezier control polygon. Stone and DeRose[12 ] use Wang's results for the general parametric cubic curve to develop a characterization diagram for Bezier curve segments based on a canonical form of the control polygon in which the first three control points are fixed. Daniels [ 13 ] develops a similar characterization diagram for B-spline curve segments. 3.2. Line-monotonicity Our interpretation of the monotonicity of a curve is patterned after Preparata and Shamos' definition of a monotone polygonal chain[l]. Our conclusions regarding line-monotonicity stem from an examination

Given a curve segment, we want to determine if it is line-monotone, and if so, the set of lines to which it is monotone. If it is not already line-monotone, we want to partition it into line-monotone pieces. It is convenient, although not necessary, to partition a curve into segments of constant sign of curvature. Later we show how this condition can be relaxed (see Section 9, Flexible Partitioning). This section provides a set of conditions that are shown in Lemma 1 to be sufficient for establishing line-monotonicity: C ~ nonzero, and,

( 1)

Total tangent rotation of not more than ~r.

(2)

Condition ( 1 ) guarantees that the second derivative

C" exists and does not change sign over the segment; that is, the segment possesses constant sign of curvature. It implies that the curve is C t continuous, and that its tangent rotates continuously and consistently from one endpoint to the other in either a clockwise or counterclockwise fashion. Condition (2) prohibits the tangent from rotating more than 7r. We introduce the following notation for describing the rotation of a curve's tangent. Let C be a curve segment satisfying ( 1 ), as shown in Fig. 3. We assume C is parametric (if it is not, an arc length parametrization can be applied to it), and assign to each point a value p of the parameter u. The associated unit tangent at p is denoted tp. The starting point of the curve has parameter value s, and the ending point e. Our frame of reference for tangent rotation is located ats. Total tangent rotation from s to p along the curve is represented by O(ts, tp), the angle that the tangent vector tp makes with ts (with the shorthand 0,p). In general, O(t~q) is the angle that a vector q makes with ts. 0 is measured clockwise if C has negative curvature at s, and counterclockwise if the curvature at s is positive. Each point p along C has a unique value, Osp, associated with it, and the restriction that the tangent

Fig. 2. Combined point generation and projection.

57

Line monotonic partitioning

tp

C te

re'

8sp

with respect to q such that tE is parallel to q. Assuming that q is parallel to ts, (similar logic holds for te), tE is parallel to L, implying tangent rotation of 7r between the two points. Additional tangent rotation from E to p causes 0~ to exceed ~r. [] In the example of Fig. 4, C is associated with not just one q vector, but a set of vectors. If we consider, instead, the example of Fig. 5 in which L is parallel to te, the only valid q is parallel to both ts and re. This is because 0se = 7r, and because L e m m a 1 requires that 0se < = O(Lq) < = 7r, then O(tsq) = ~r.

s Fig. 3. Frame of reference for tangent rotation. rotate not more than 7r from s to e can be restated as:

Ose < =

7r.

LEMMA 1. I f a curve segment C satisfies conditions ( 1 ) and (2), then C is line-monotone. C is monotone with respect to any line M orthogonal to a vector q, where q obeys the condition: Ose < = O(tsq) < = r . The shaded region of Fig. 4 shows the valid range of the vector q for the curve of Fig. 3. M i s perpendicular to q, and C is m o n o t o n e with respect to M. At the extremes of the shaded region, q can be parallel to either te or t~. (Note: The vector q is important in filling applications, because it represents the direction of projection (fill direction) for points along a curve.)

Sketch o f Proof o f Lemma 1 (see [ 13 ] for details). To establish monotonicity, it suffices to show that as we travel from C to M in direction q, we cannot intersect C again. The proof is by contradiction on two cases o f q. I f q is within the shaded region, but not on a boundary, then it is not parallel to any tangent o f C. In this case, an intersection with C implies that C possesses an extreme point with respect to q at which the tangent is parallel to q. The case o f q at the extremes o f the shaded region produces a similar contradiction. In this case, q is either parallel to ts or t~. An intersection point p with C implies that C possesses an extreme point E 0 ts

"~

S ,

i

%'%%%

te

5. PART1T|ONING APPROACH The goal of our partitioning approach is to subdivide a curve into a sequence of segments, such that each segment meets our set of sufficient conditions and is therefore, by L e m m a l, line-monotone. That is, we need to partition C into a sequence of pieces:

c = ( c , , c~ . . . . .

co),

where n is the n u m b e r of line-monotone pieces of C, and ci ( l < = i < = n) is line-monotone. Partitioning is a three-step process. The first two steps are needed to satisfy condition ( 1 ), and the third fulfills (2): 1. Locate point s along C that disrupt C ~ continuity. Partition C at those points to form a sequence of curve segments. (For example, parametric cubics are partitioned at cusps, if they exist.) 2. For each of the segments produced by step l, locate point s where C" is 0 (i.e., inflection points). Partition each segment at those points. The result is a modified list of curve segments. 3. Beginning at the starting point s of each segment ci, locate points along c~ for which the tangent rotation with respect to ts is an integral multiple of 7r. One point exists for each tangent parallel to ts. Partition c~ at those points to create a modified list of curve segments. As a result of this process, each c~ meets the sufficient conditions of Lemma l and is therefore line-monotone. Step (3) relies on the simple relationship between Oseand the m a x i m u m n u m b e r of parallel tangents that can exist on a curve satisfying ( 1 ). For example, if 0se

o ,o,y,,'°'"

""'"'"'~"/" q .."

~ t e

M

8se

............... Fig. 4. Valid range ofq.

!_". . . . . . . .

~ .......

Fig. 5. Single valid q.

58

KAREN M. DANIELS, R. DANIEL BERGERON, and GEORGES G. GRINSTEIN

= ~r, only one tangent can be parallel to t,. IfOse = 2~r, two are possible. Each addition of 7r to 0,e adds the possibility of another parallel tangent. In general, if a curve segment satisfies ( 1 ), and 0se < = n,r, where n is a positive integer, then it can be partitioned into n linemonotone pieces. The above process can be applied to curves regardless of whether they are convex or not convex, closed or not closed, self-intersecting, or not self-intersecting.

P4

p

pl

\

6. CONTROL POLYGON SHAPE CLASSIFICATION

The remainder of this paper addresses the problem of partitioning a planar, closed, periodic, cubic B-spline curve into line-monotone pieces by applying the technique presented in the previous section to each individual curve segment specified by a set of four distinct control points. In preparation for an examination of shape properties that influence line-monotonicity of cubic B-spline curve segments, we present a control polygon classification. Then, for curve segments generated by our control polygon shape classes, we examine inflection points, cusps, and loops. Knowledge of these behaviors is used to partition a curve segment into pieces that satisfy our set of sufficient conditions for line-monotonicity. The control polygon of a planar, parametric, cubic B-spline curve segment can be used to classify the shape of the curve segment. If the first three control points, PI,/)2, and P3, form a triangle, we can extend the sides to partition the plane into seven regions, as demonstrated in Fig. 6. IfP~,/)2, and P3 are collinear and/)4 is not on the line PtP2P3, we can reorder the control points to obtain the partitioning of Fig. 6. We define shape classes based on the geometric relationships among the four control points. For illustrative purposes we have transformed the control polygon so that the line segment determined by Pt P3 is horizontal, P~ is to the left of P3, and P2 is above P~ P3. (Note: This transformation is for presentation purposes only; a control polygon can be classified in its original form.)

.../

iB

Fig. 7. N-shaped control polygon.

When the fourth control point/)4 is added, it falls either on one of the boundaries, or in one of the seven regions. We assume that all four control points are distinct; hence P4 cannot fall on a vertex of triangle P~/'2 P3. Depending on the position of P4, the control polygon P of a planar, parametric, cubic B-spline curve segment assumes one of six distinct shapes: (a) collinear, (b) N-shaped, (c) self-intersecting, (d) spiral, (e) V-convex, or (f) U-convex. Within each of the six classes, control polygons exhibit the same shape that is easy to recognize (with the exception of some of the boundary cases). These shape classes are described by the definitions presented below:

Definition 1 (Collinear) : P is collinear if P~, P 2 , / 3 , a n d / ' 4 are collinear. In this degenerate case, the control polygon and the curve are straight lines. Definition 2 (N-shaped): P is N-shaped if P~ and P4 lie on opposite sides of the line P2P3 (see Fig. 7). Definition 3 (Self-Intersecting): P is self-intersecting if PaP4 intersects P,/'2, with the restrictions: 1. P3P4 does not pass through P~ (it is allowed to pass through/'2), and 2. P4 does not lie on P, P2 (see Fig. 8.) Definition 4 (Spiral): P is spiral if P2, P3, and P4 are not coUinear, and one control point lies within or on the boundary of the triangle determined by the other three consecutive control points. Figure 9 shows two typical spiral control polygons. A spiral control polygon can either have/'4 within triangle PIP2P3, a s in Fig. 9a, or Pl within triangle P2P3P4, as in Fig. 9b. Definition 5 (V-convex): P is V-convex if it contains three, but not four, collinear control points, such

\

(a)

Fig. 6. Extended triangle Pj P2P3.

(b)

Fig. 8. Self-intersecting control polygons.

59

Line monotonic partitioning

P2

P2

Pl

P2

P4j (a) P4within triangle P 1P2P3

/:

(b) Pl within triangle P2P3P4

jI e#e

Fig. 9. Spiral control polygons.

I

that/'2, P3, and P4 are collinear. As shown in Fig. 10, the V-convex control polygon contains only two line segments, which form a V-like shape. Definition 6 (U-convex): P is U-convex if it is convex and no three control points are collinear. A U-convex control polygon results when the fourth control point is in the region below P~ P3 and bounded by extended segments P2P1 and P2P3, as depicted in Fig. 1I. In this region, the polygon is clearly convex. The term U-convex reflects the fact that the polygon has three segments that form a convex U-like shape. Figure 12 shows the shape class associated with each region and boundary of our partitioning. The definitions above are consistent with boundary assignments. Boundary choices between two adjacent shape classes favor the shape class that provides the most information for partitioning purposes. For example, we show later that a spiral control polygon always produces a single line-monotone curve segment, so many boundaries receive this label.

/

I~ J

• •t "'l

Fig. 11. U-convex control polygon.

points, one inflection point, or no cusps, loops, or inflection points. Wang analyzes these shape characteristics for the general parametric cubic curve, and then examines the B-spline case. He proves that a cubic B-spline curve segment has exactly one inflection point when the first and fourth control points lie on opposite sides of the line segment determined by the second and third points. In terms of our shape classes, this condition holds when a control polygon is N-shaped. V-convex control polygons produce curve segments containing a single inflection point. The inflection point is induced by the coilinear edge of the polygon; hence if P~/)2/)3 are collinear, the starting point of the curve segment is an inflection point. Similarly, collinearity of PEP3P4 induces an inflection point at the curve's endpoint. These results are easily inferred from for-

7. INFLECTION POINTS, CUSPS, AND LOOPS For cubic B-spline control polygons in each shape class, we discuss a set of curve segment shape properties that influence line-monotonicity: inflection points, cusps, and loops. (Note: We do not discuss the collinear shape class here, because the associated curve segment is a straight line.) Wang [9] provides algebraic tests for the existence of inflection points, cusps, and loops in planar parametric cubic B-spline curve segments specified by four distinct control points. He shows that the existence of a cusp, a loop, and two inflection points are mutually exclusive. If the parameter is unrestricted, the curve has either one cusp, one loop, or two inflection points. When the parameter is restricted to the interval [ 0, 1], the curve has either one cusp, one loop, two inflection

, e

[]

D t

p3

(a}

......~L

x,

!

. . . . . .

m X

[]

P2

\

N-shaped

I'Eil Self-intersecting Spiral ] V-convex [] U-convex

(b)

Fig. 10. V-convex control polygons.

Fig. 12. Correspondence between classes and partitioning.

60

KAREN M. DANIELS, R. DANIEL BERGERON, and GEORGES G. GRINSTEIN

~:.'..~..~..C.`.`...~.~.~..~..~.:~`..~..~..:.....:~.~.7~..~...~.:.`.~..~. -Q6

Q5

[] .....

NN

I .....

#1

.PZ.

/

f'

Q2ql

i

One IrtbctJon pole

era:,, ~ : , a- two tr,t~uon I

I No cu~, ~

or i ~ U ° n

Po ~

Fig. 13. Correspondence of Wang's results to partitioning.

mulas presented in [ 9]. A B-spline curve segment has an inflection point at an endpoint if and only if the first three control points or last three, (in any order) are collinear. Wang identifies conditions under which a curve segm e n t has no cusp, loop, or inflection points. For a given set o f P j , / ' 2 , and/)3, the curve has no cusp, loop, or inflection points when/)4 is in the unshaded region of Fig. 13. The points Ql, Q2, Qs, and (26 are constructed from the triangle defined by PIP2P3 as follows. Q] and Q2 lie on the extended segment P2P3 such that 11/2(2211 = IIa]P311 = 3[IP2P3[[. Q5 is chosen so that ,°20_5 is parallel to Q2PI and Q6 is such that Q~Q6 is parallel to/)3 PJ. Cusps, loops, and multiple inflection points are usually undesirable features when they occur in modeling applications, so it is useful to know that they can only occur when a cubic B-spline curve segment's control polygon is self-intersecting. If the fourth control point falls in the lightly shaded part of the self-intersecting region, straightforward algebraic tests on the control polygon, developed by Wang, can be applied to a specific curve to test for the existence of a cusp, a loop,

two inflection points, or the absence of all these behaviors (see [13]). The behavior of each of our shape classes with respect to cusps, loops, and inflection points is summarized in Table I. CUBIC B-SPLINE CURVE SEGMENTS A closed, periodic, cubic B-spline curve can be partitioned into line-monotone pieces by traversing the 8. PARTITIONING OF

Table 1. Number of inflection points, cusps, and loops by shape class. Number of Shape class

Inflection points

Cusps

Loops

Collinear N-shaped Self-intersecting Spiral V-convex U-convex

0 1 0, 1, or 2 0 1 0

0 0 0 or 1 0 0 0

0 0 0 or 1 0 0 0

61

Line monotonic partitioning control polygon and partitioning the curve one segment at a time. This section shows how to partition an individual B-spline curve segment. We examine line-monotonicity of cubic B-spline curve segments associated with each of our control polygon shape classes, and show how to partition a curve segment of a given shape class into a set of linemonotone pieces. Cusp, loop, and inflection point information allows us to identify segments for which C" is nonzero. Bounds on 0se are established using information derived from the control polygon of the shape class. Once (1) and (2) are satisfied, Lemma 1 is applied.

P2

ta

...........

.P3 Pl

Fig. 15. Spiral control polygon and curve segment.

8.1. Preliminaries Our discussion uses properties of cubic B-splines, such as the variation diminishing property and the trisection method. The trisection method [7 ] gives the two curve endpoints and their tangents. Given a periodic cubic B-spline control polygon formed by the four distinct control points PI, P2, P3, a n d / ' 4 , if we trisect each edge as in Fig. 14, then the starting point for the curve segment is G, the midpoint of line segment BC. The ending point is H, the midpoint of line segment DE. The tangent at the starting point is parallel to P~ P3, and the tangent at the ending point is parallel tO P2P4. In addition, we exploit the following facts: 1. A parametric cubic curve cannot have three distinct parallel tangents. Since x(u) and y(u) are cubies, dx/du and dy/du are quadratic functions of u. dy/ dx is a rational function with quadratic numerator and denominator; hence there can be at most two parallel tangents in the x-y plane. As a consequence, if a B-spline curve satisfying ( 1 ) has at most two parallel tangents, then due to the relationship between 0se and the maximum number of parallel tangents, 0se < 2~r. Because of this relationship, the converse is also true: if0se < 27r, the curve can have at most two parallel tangents. 2. The periodic cubic B-spline blending functions are symmetric in terms of the contributions of the four control points over the interval [0, 1] for the parameter u. That is, P, and P4 contribute symmetrically, as do P2 and 1°3. This is shown by the following B-spline formulation [ 7 ]:

p2.

/S

c

o~t 'SS

p]

o

:3

II%~

//

-,.\

/'"

,,

Fig. 14. Control polygon trisection. CAC 16:I-E

P4

P(tt) ='~(1 - u)aPI +

+(~ (u-ly 2

+ T - - u2 P2 (u-

)

1

1) 2 P3 +-~ u3p4.

The symmetry becomes clear by applying the mapping Pi -~ P4, P2 ~ / 3 , P3 --~ P2, P4 --~ P1, and substituting ( l - u) for u. As a consequence, if a certain shape behavior holds for P , . • •/'4, it also holds under the mapping for/'4" • • P~. This allows us to conclude, for example, that similar shape behavior is exhibited for a spiral control polygon whether P4 is within the triangle defined by Pt, P2, and P3, or Pl is within the triangle defined by P2, P3, and P4. Without loss of generality, we assume that P4 is within the triangle defined by Pt, /2, and P3. 8.2. Partitioning by shape class 8.2.1. Spiral. In the spiral case, the associated curve segment has no cusps, loops, or inflection points. It satisfies (1). We assume, without loss of generality, that the curve has negative curvature. Let ,°4 be within the triangle determined by P1, P2, and/)3. Figure 15 depicts a spiral control polygon of this form, with its curve segment. The trisection construction allows us to identify the curve's endpoints (s and e) and their tangents (ts and te) from the control polygon. Recall that for a cubic B-spline segment, ts is parallel to PI P3, and te is parallel to 1"21'4.In the spiral case, the fact that the fourth control point is within (or on the boundary of) the triangle formed by the other three points allows us to place bounds o n Ose. Because P4 is within or on the boundary of triangle PJP2P3,the direction of P2Pa is bounded by the vectors P2PI and P2P3, as shown in Fig. 16a. IfPa is on P2Pt, 0se = a, as indicated in Fig. 16b. Similarly, if P4 is on P2P3, 0se =/3, as shown in Fig. 16c. The angles c~ and are limiting angles for 0se. (Note: Since a V-convex polygon is formed when P4 is on P2Ps, 0~,can approach, but not equal,/3 for spiral control polygons.) Because we assume that P2 is above P, P3, the initial curvature

62

KAREN M. DANIEl.S,R. DANIELBERGERON,and GEORGESG. GRINSTEIN P2

(a) Direction of P2P4 is bounded by P2Pl and P2P3.

P4

~]

(b) R o t a t i o n f r o m PIP3 t o P2P! - It - ¥

--

(c) R o t a t i o n f r o m PI P3 t o P2P3 p - angle P2P3Pl

Fig. 16. Tangent rotation bounds for spiral case.

is negative, so angles are measured clockwise, and ~, = angle P3PIP2 > 0, so a < 7r (see Fig. 16b). The same assumptions lead to the conclusion that/~ < ~r, as seen in Fig. 16c. (Note that if P2 is below P I / 3 , initial curvature is positive, and angles are measured counterclockwise, so the same constraints on 0se hold.) Both boundary cases obey the restriction that the tangent rotate < = ~r, so 0se < = ~r. Because 0s~ <--- r , (2) is satisfied; hence by L e m m a 1 the curve segment generated by a spiral control polygon consists of one line-monotone piece. 8.2.2. U-convex. Recall that a U-convex control polygon is formed when P4 is below P, P3, and within the extended segments P2PI and P2P3. Angles associated with P2Pt and P2P3 formed the basis of our arg u m e n t that a spiral control polygon obeys the restriction 0se < = 7r. In the U-convex case, the direction of P2P4 is bounded just as in the spiral case; only the length of P2P4 changes. Thus, the same logic can be applied to conclude that a U-convex polygon generates one line-monotone curve piece. 8.2.3. V-convex. A V-convex control polygon is formed whenever the last three control points are collinear. The collinear edge induces an inflection point at the endpoint e of the associated curve segment. From the trisection method, since e is on P2P3P4,te is parallel to/'2P3/'4. Recall from our treatment of the spiral case that 13 < = r (refer to Fig. 16b). This means that 0se < = a', so we can apply L e m m a 1 to conclude that a single line-monotone curve piece is generated by a Vconvex control polygon.

8.2.4. N-shaped. The N-shaped case is intimately related to the V-convex case. We show that N-shaped control polygons generate curve segments with two line-monotone pieces, one on either side of the inflection point. We demonstrate that each of the two pieces associated with an N-shaped control polygon is of the type generated by the V-convex case. From our discussion of cusps, loops, and inflection points, we know that an N-shaped control polygon produces a curve segment possessing a single inflection point. We subdivide the curve at the inflection point F into two pieces, Cl and C2, as shown in Fig. 17. If each piece is viewed as an individual curve segment, with parameter ranging uniformly over [ 0, 1 ], and its own unique cubic B-spline control polygon,

F

Fig. 17. Partitioned curve for N-shaped case.

Line monotonic partitioning

K

Fig. 18. Partitioned curve for cusp case.

then each has an inflection point at one endpoint. From Wang's necessary and sufficient conditions for an endpoint of a parametric cubic curve segment to be an inflection point [ 9 ], we know that the control polygon corresponding to G , (and also the one for C2), must have an edge with three collinear control points. This means that C1 and C2 are each produced by a V-convex control polygon. In the V-convex case, there is a single line-monotone curve segment. The collinear edge is the tangent to the curve at the inflection point. C~ and C2 share the same inflection point, and the same collinear edge, which is coincident with the tangent to the original curve at the inflection point F. Therefore, C~ is a single line-monotone curve piece, and the same is true of C2. A curve segment produced by an N-shaped control polygon can therefore be partitioned at its inflection point into two line-monotone curve pieces. 8.2.5. Self-intersecting. Self-intersecting control polygons generate curves possessing either: 1. 2. 3. 4.

a cusp, a loop, two inflection points, or none of these shape behaviors.

8.2.5. I. Self-intersecting case l: Cusp. A cusp is the point at which d x / d u = 0 and d y / d u = 0. At a cusp, the unit tangent vector is discontinuous. A typical cubic B-spline cusp is shown in Fig. 18. The cusp point K on a cubic B-spline curve segment is a multiple root of a function Wang extracts from the parametric cubic curvature formula[9]. It is, in effect, a place at which two inflection points coexist and the sign of curvature changes twice. As such, K partitions the curve segment into two pieces, C~ and C2. Each piece has an endpoint that is an inflection point, and satisfies ( l ), except at that endpoint.

C2CI~C 3

63

As in the N-shaped case, we decompose the curve into two pieces that each exhibit the behavior of a curve associated with a V-convex control polygon. However, since the tangent at the cusp point is discontinuous, we do not apply L e m m a 1 directly. Instead, we consider a point K' on C1 (and a similar point on C2) that is some arbitrarily small distance ~ away from K. L e m m a l can then be applied separately to each modified piece. As a result, the cusp curve consists of two line-monotone pieces. 8.2.5.2. Self-intersecting case 2: Loop. A B-spline curve segment with a loop is self-intersecting, as shown in Fig. 19. Recall that the relationship between 0se and the m a x i m u m n u m b e r of parallel tangents is valid for selfintersecting curves. This means that 0~,.< 27r for a cubic B-spline curve segment possessing a loop. We can therefore partition the segment into two line-monotone pieces by locating a tangent parallel to ts. (Note: In Section 9, Flexible Partitioning, we give an alternative partitioning method for the loop which uses the selfintersection point R.) 8.2.5.3. Self-intersecting case 3: Two inflection points. Given two inflection points at parametric values ul and u2, i f 0 < = u~ < u2 < = 1, u~ and u2 partition the curve segment into three pieces: G , C2, and 6+3, as shown in Fig. 20. Each satisfies ( 1 ). C1 and C2 each have an inflection point at an endpoint; hence they behave in a V-convex manner and are each linemonotone. C~ does not exist if ul = 0, and ('3 does not exist if u2 = 1. Further partitioning of C2 depends on whether or not 0u~u2 > 7r. If it is not, C2 is line-monotone. If it is, then since ~r < #,~u2 < 2~r, C2 can be partitioned into two line-monotone pieces. The curve segment can be partitioned, using this method, into two to four linem o n o t o n e pieces depending on the existence of C~ and C3 and the value of 0~u2. 8.2.5.4. Self-intersecting case 4: No cusp, loop, or inflection points. If a self-intersecting control polygon generates a curve segment with no cusp, loop, or inflection points, then the curve satisfies ( 1 ), and spirals inwards, as shown in Fig. 21. Since a cubic B-spline curve segment cannot have three parallel tangents, 0se < 27r. The number of linem o n o t o n e pieces depends on 0se. If 0+,, < = 7r, we have

/

Ul i

.2,, Fig. 19. Partitioned curve for loop case.

]

e

ca

;\ !

Fig. 20. Partitioned curve for two inflection ca~.

64

KAREN M. DANIEl.S, R. DANIEL BERGERON, and GEORGES G. GRINSTE1N

Fig. 21. Spiraling curve behavior.

one line-monotone piece by L e m m a 1. If 0~ > ~r, we can partition it into two line-monotone segments by finding a tangent parallel to t~. Table 2 summarizes our line-monotonic partitioning results by shape class. It shows the m i n i m u m n u m b e r of pieces that are characteristic of each shape class. Note that in the collinear, spiral, U-convex, and Vconvex cases, the curve consists of one line-monotone piece. When control polygon analysis identifies one of these cases, no curve analysis is required. In the next section we show that flexible partitioning techniques can be used to reduce the n u m b e r of m o n o t o n e pieces for several shape classes, so that two are sut~cient in all cases. An algorithm for line-monotonic partitioning of cubic B-splines, based on the information in Table 2, appears in [13]. 9. FLEXIBLE PARTITIONING

In this section we explore flexible partitioning techniques that provide alternatives to the subdivision approach used thus far. Other subdivision methods exist. In addition, partitioning can include the post-subdivision process of merging adjacent line-monotone segments to form larger line-monotone segments. Merging is advantageous if the goal is to minimize the n u m b e r of line-monotone segments. Here we discuss several subdivision techniques related to the convexity of a curve segment. We then describe the merging process.

9.1. Convexity A convex curve segment satisfying ( 1 ) is such that 0~ < = 2~r. This means that the curve has at most three

Table 2. Monotonic partitioning by shape class.

Shape class Collinear N-shaped Self-intersecting with: Cusp Loop Two inflection points No cusp, loop or inflection points Spiral V-convex U-convex

parallel tangents. If the convexity of a curve segment satisfying ( 1 ) is easy to establish, it can be advantageous to identify convex curve pieces first, and then partition each convex piece into line-monotone pieces. This can result in a larger n u m b e r of line-monotone pieces. If a convex curve obeys the restriction 0se < = ~r, it meets the requirements of L e m m a 1, and consists of one line-monotone piece. In fact, all curves satisfying (1) for which Ose < = 71"are not only line-monotone, but also convex (see I13 ] for proof). The set of linem o n o t o n e curves satisfying ( 1 ) is therefore a subset of the set of convex curves satisfying ( 1 ). If ~r < 0~e < = 27r, we partition the convex curve. Since 0~e <--- 2~r, we can partition the curve at a tangent parallel to t~ into two line-monotone pieces. However, if we already have two parallel tangents (distinct from ts and t e l we can use them to conveniently form three line-monotone pieces. For example, let tp and t~ in Fig. 22 be two parallel tangents on C. These tangents are associated with parameter values p and q, respectively, where s < = p < = q < = e. Because the tangents are parallel, Om = ~r, and the conditions of Lemma 1 are satisfied for the curve piece from p to q. For example, the piece A~ in Fig. 22 is line-monotone. Because 0~e < = 21r and 0pq = ~r, Ü~p + Oqe < = lr, so the piece from s to p and the piece from q to e both satisfy the conditions of Lemma 1 and are line-monotone. In Fig. 22, these correspond to pieces A2 and A3. Suppose we know that a curve satisfies ( 1 ), and Ose < = 2r, but no information on its convexity is available. (Note: a curve of this type that is not convex assumes a spiral-like shape.) To identify convex pieces in this case, we can employ the following lemma that involves the line joining the two curve segment endpoints. LEMMA 2. l f a nonself-intersecting curve C satisfying ( 1 ) is such that r < 0se < = 2r, either C is convex or the line L joining its two endpoints partitions the curve into two convex pieces (see Fig. 23 ). In the proof of this lemma in [ 13 ] we establish the fact that a curve C satisfying ( 1 ) which has only two intersections with L is convex. If we modify such a curve so that its endpoints approach each other along L, C eventually becomes a closed curve. Therefore, if C is closed, it is convex. In addition, we can easily show that 0~e > ~r for the closed curve. In order for the curve to close, it must possess an extreme with respect

Number of line-monotone pieces 1 2 2 2 2-4 1 or 2 1 1 1

et ~ A ~ mT AI

-p

Fig. 22. Partitioning a convex curve.

A~8 A2

65

Line monotonic partitioning

o.s

B'

Fig. 23. L forms two convex pieces.

to the starting tangent t, (implying that Ose > = "ff ), and the tangent must rotate beyond this so the curve can come back to s. (This result is useful in analyzing loops in cubic B-splines.) If, in addition, the closed curve is smooth at its endpoints, Ose 27r[ 14 ]. (This is exploited in the filling of closed periodic cubic B-spline curves, which are smooth everywhere by definition.) Figure 24 summarizes our curve analysis relative to convexity. Ifa curve satisfying ( 1 ) meets the condition 0so < = 27r, we can partition it into two line-monotone pieces, and if0s, < = 7r, the entire curve is already linem o n o t o n e ( a n d also convex), so no partitioning is necessary. If such a curve is nonself-intersecting and ~r < 0~ < = 2rr, it is either convex or is partitioned into two convex pieces by the line joining its endpoints. =

9.2. Self-intersecting, loop case The above results lead to an alternative partitioning approach for loops generated by self-intersecting cubic B-spline control polygons. The self-intersection point R (see Fig. 19) corresponds to two distinct values of

Curves satisfying:

I) C" nonzero

the parameter u. Let these be u~ and u2. R partitions the self-intersecting curve into three pieces: C], C2, and Ca. C~ does not exist if ut = s, and Ca does not exist if u2 = e. Applying our result concerning a closed curve satisfying ( l ), C2 is convex and its tangent rotation is in the range (Tr, 27r). Therefore rr < 0m=2 < 27r. (72 can be easily partitioned into two line-monotone pieces using methods described earlier. Ct and Ca, if they exist, are each line-monotone. To see this, observe that ~r < 0u~,2 < 2~r together with 0so < = 2,r imply that Osu~+ 0=2e < rr. The piece Ct from s to u, and the piece Ca from u2 to e both satisfy the conditions of L e m m a I and are therefore line-monotone. The loop can therefore be partitioned into two to four m o n o t o n e pieces, depending on the existence of Ct and Ca. 9.3. Self-intersecting, no cusp, loop, or inflection point case For this type of curve (see Fig. 22), if0se > 7r, we can either partition it into two monotone segments by finding two parallel tangents, or by L e m m a 3, using the line that joins its endpoints, partition it into two convex pieces from which we can find line-monotone pieces. 9.4. Merging The partitioning process produces a sequence of linem o n o t o n e curve pieces: C =
c.>.

2) Ose <: 2~

Con be partitioned into 2 line-monotone pieces.

Convex

Not Convex:

0$g
8se> l~ Is not cbsed

Ser-tieme¢tlng

Can be I~rtitloned into 3 line-monotone pieeec uol~ 2

Nrtllel teneeMs.

J ,

..,

,

,

Can be pQrtttionN taro 3 it < 0s0sed N~t Cbsed

Hot sef-Rltstctlt~: Ctn be i)~rtttionedby line joinirw) ondpolnil into Z convex"not cloecd

pleats.

Srnodch at endpoinls

Osa'2~

0

Not Smooth ~ erdp~n~

8SO< Z~

s"

0

°B



(;on be partitionedihto $ lthe-Ilt0netOnepteCec UMnO2 atrollel tonnent,.

Fig. 24. Relationship among curve results.

66

KARENM. DANIELS,R. DANIELBERGERON,and ~EORGESG. GRINSTEIN

We define the range rk associated with a line-monotone curve piece ck to be: rk = [Oi, 02],

where 01 and 02 are bounds on the angle associated with a valid vector q from Lemma I for ck: (01 <= O(t~q) < = 02). I f a curve consists of a single linemonotone piece, then 01 = 0,~ and 02 = 7r. Ifa monotone curve is further partitioned, the range of each subpiece is at least as large as that of its predecessor. To see how ranges of subpieces are constructed, consider the example of Fig. 25. C is linemonotone, and its initial range before partitioning is: r = [0~, 7r]. C is partitioned at p, forming subpieces ct and c2, with associated ranges rt and r2 rt = [Osp, Tr]

r2 = [Ose, Osp + 7r].

The intersection of the two ranges r~ and r2 yields the original range r, Clearly 0~ > = 0,p, since e > = p, and 0s~ < - ~r, so rj and r2 have a non-null intersection. Forming the intersection of the ranges of two adjacent line-monotone pieces is a process we call merging. If the resulting range is non-null, the merged piece is line-monotone. Since the merging process involves the intersection of ranges, it is a restricting process. Partitioning, its inverse, adds flexibility, because the range of each subpiece is at least as large as that of its predecessor. The choice of the number of line-monotone pieces n for a particular application depends on the relative importance of n versus the desired range sizes for line-monotone pieces. 9.5. N-shaped case The merging process can be applied to the two linemonotone curve subpieces (Ca and C2) produced by tp

M

r,. r 1 IrtQtr,~et r2

rl-r r2-r

Fig. 25. Intersection of ranges.

an N-shaped cubic B-spline control polygon (see Fig. 17). Since C~ and 6"2 share the tangent tF at the inflection point, (tF = te for Ca and tr = t, for C2), they are both monotone with respect to any line orthogonal to tr rl = [Osr, It]

r2 = [Ow + 7r, Ose].

Since OsFis parallel to O,r + ~r, the intersection of r~ and rE contains at least Ow. Hence, the entire curve segment generated by an N-shaped control polygon is line-monotone. 9.6. Self-intersecting, two inflection point case As in the N-shaped case, line-monotone pieces that share an inflection point can be merged in the two inflection point case so that the resulting piece is linemonotone. Recall that adjacent curve pieces C~ and C2 share an inflection point, as do pieces 6"2 and C3 (see Fig. 20). If C2 is line-monotone, it can be merged with either Cl or (73, resulting in two line-monotone pieces. If 6"2 is not line-monotone, it consists of two line-monotone pieces, Each can be merged with one of C~ or C3, resulting again in two line-monotone pieces. Therefore, this type of curve segment can be partitioned into two line-monotone pieces. Since the self-intersecting, two inflection point case is the only one from Table 2 that exceeds the two-piece bound, our merging results confirm that, in all cases, the cubic B-spline curve segment can be partitioned into two line-monotone pieces. Since a curve that can be represented in B-spline form can be represented as another type of parametric cubic via a change in basis, any parametric cubic curve segment can be partitioned into two line-monotone pieces. 10. NONUNIFORM RATIONAL B-SPLINES Nonuniform rational B-splines (NURBS) are very popular as a basis for curve and surface design (see, for example, [l 7 ]). NURBS curves are significantly more powerful than the more basic uniform B-splines we have dealt with so far. The increased curve variability is caused by the nonuniform knot placement, the influence of the weights, and the rational divisor. Although a direct classification of a cubic NURBS curve from its control polygon is not yet known, there is a straightforward transformation that allows us to partition a planar cubic NURBS curve segment by first redefining it in terms of a corresponding uniform (nonrational) B-spline. The corresponding simpler curve can be partitioned into line-monotonic segments using our techniques. The partition endpoints can be mapped back to corresponding points of the original curve and are guaranteed to represent a line-monotonic partitioning of the original curve. Although this process is relatively expensive, it needs to be done only at curve definition time, not at curve display time. Line-monotonic partitioning of a planar cubic nonuniform rational B-spline curve specification is accomplished with the following steps:

67

Line monotonic partitioning 1. represent the control points in a coordinate system defined on the plane of the curve; on this plane the curve is simply a nonuniform nonrational B-spline curve; 2. transform this nonuniform B-spline curve specification into a uniform B-spline, yielding 4 new control points; 3. partition the uniform B-spline; 4. map the partition endpoints (and associated tangent values) back to the original curve segment.

,

"... s ~ r ~

s~n¢,.

.,

$

""

mono~r~o¢~

Fig. 26. A monotone hull.

10.1. Correctness To show the correctness of the above process, we must show that the projection induced by the rational divisor in the NURBS representation does not alter the correctness of the partitioning done prior to the projection. This is straightforward. In a related paper[2] we introduce the concept of a monotone hull of a monotone curve segment: if the total tangent rotation of a monotone curve segment is strictly less than ~r, the monotone hull is a triangle that has two sides tangent to the endpoints of the segment and is guaranteed to enclose the segment (see Fig. 26). (If the total tangent rotation of a curve segment equals w, the segment is subdivided.) Consider the perspective projection of a curve segment and its monotone hull. The perspective projection maps lines to lines, half-planes to half-planes, tangents to tangents, and triangles to triangles (see [ 18 ], for example). It is easy to show that an inflection point cannot be introduced into the projected segment. A triangular monotonic hull of a line-monotonic curve segment prior to projection maps to a triangle and the projected segments' endpoints will still be tangent to two sides of the projected triangle. Consequently, the projected segment has no inflection points and must have a total tangent rotation less than ~r, so it must be line monotonic. 10.2. Cubic Nonuniform B-splines (NUBS) The major computational step in the process is to transform a cubic nonuniform (nonrational) B-spline (NUBS) into a uniform B-spline, which can be partitioned into line-monotonic segments. This is a straightforward, but tedious process. The standard recursive definition of a nonuniform B-spline due to deBoor[ 19 ] and Cox [20] is given by a recurrence relation defining the blending functions based on the knot values. Each segment of the curve is defined by four consecutive control points and four knot values for the subset of the parametric variable between two consecutive knots. For each segment, we can expand the curve definition algebraically to yield cubic parametric equations whose coefficients are based on the values of four of the original control points and four knots. We can then transform the representation once more so that the parametric variable ranges from 0 to I. Given any cubic equation, we can easily find a set of four control points such that the uniform B-spline defined by those control points matches the cubic equation in the range of the parametric variable from 0 to I. A straightforward implementation of the entire

process requires at most 105 additions, 130 multiplications, and 8 divisions per curve segment (see [ 21 ] ). Note once again, that this process need only be performed at curve definition time. Once the partitioning process has been applied to the uniform representation of the curve, the partitioning points can be mapped back to corresponding parametric points on the original curve. Other relevant data, such as tangents, can also be retained and saved with the partitioning information, 11. SUMMARY This paper presents a technique for the partitioning of planar curves into line-monotone pieces. We provide a set of sufficient conditions for line-monotonicity,and a partitioning approach based on this set. A closed, periodic, cubic B-spline curve can be partitioned into line-monotone pieces by traversing the control polygon and partitioning the curve one segment at a time. We show how to partition an individual cubic B-spline curve segment. We show how this approach can be applied to a planar nonuniform rational B-spline curve. Our cubic B-spline control polygon shape classification specifies a set of shape classes that facilitate identification of line-monotone pieces of curve segments based on control polygon analysis. Knowledge of inflection points, cusps and loops allows us to identify curve pieces for which C" is nonzero; examination of tangent behavior for these pieces yields bounds on the total tangent rotation of a curve segment, allowing us to either establish line-monotonicity or partition a segment into line-monotone pieces. Each segment is either line-monotone, or can be partitioned into two line-monotone pieces, a result which is valid for all parametric cubic curve segments. 12. FUTURE WORK

12.1. Partitioning other curve types Partitioning methods can be developed, not only for other types of parametric cubics, but also for orders other than cubics. Some of our results extend nicely in this direction because of the relationship between the order of a curve and the number of possible parallel tangents. For example, there appears to be a direct connection between the number of possible parallel tangents and the m i n i m u m number of line-monotone pieces. For parametric cubics, two parallel tangents axe possible, and curve segments can be partitioned into

68

KAREN M. DANIELS,R. DANIELBERGERON,and GEORGESG. GRINSTE1N

two line-monotone pieces. For quadratic splines, all curve segments are line-monotone, and one would expect, that for the order four case, curve segments are partitionable into three line-monotone pieces. The partitioning technique described here can be applied to a broad range of curve types. Identification of line-monotone pieces for some curve classes can be based on our sufficient conditions and partitioning methods, taking advantage of existing curve properties and knowledge of singular points (such as inflection points). For m a n y curves, the type of approach presented here for identifying line-monotone pieces of cubic Bsplines should prove useful. That is, determine the kinds of singular points that disrupt the conditions of L e m m a I, and find a way to identify them efficiently. For B-splines, our control polygon classification gives us a way to determine, from simple tests on the control polygon, whether or not inflection points exist on a curve segment.

4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

12.2. Applications o f line-monotonic partitioning We have already begun to investigate applications of line-monotonic partitioning to curve filling and curve intersection problems (see [2] a n d [ 3 ]). The relationship between this technique and other filling-related graphics algorithms can be explored. For example, it is possible that information about linem o n o t o n e pieces of a curve can provide useful data for an adaptive curve point generation algorithm, because of the relationship between monotonicity and curvature. REFERENCES

l. F. Preparata and M. Shamos, Computational Geometry." ,,In Introduction. Springer-Verlag, New York ( 1985 ). 2. K. M. Daniels, R. D. Bcrgeron, and G. G. Grinstein, Filling Monotonically Partitioned Periodic Cubic BSplines. Technical Report 91-14, University of New Hampshire ( 1991, August). 3. K. M. Daniels, R. D. Bergeron, and G. G. Grinstein, Using Monotone Hulls for Curve Intersection. Technical

14. 15.

16. 17. 18. 19. 20. 21.

Report 91-03, University of New Hampshire ( 1991, Febmary). M. E. Mortenson, Geometric Modeling. John Wiley & Sons, New York (1985). I. D. Faux and M. J. Pratt, Computational Geometry for Design and Manufacture, Ellis Horwood Limited, Chichester (1979). G. Farin, Curves and Surfaces for Computer-Aided Geometric Design, Academic Press, Inc., Boston (1988). T. Pavlidis, Algorithms for Graphics and Image Processing. Computer Science Press, Maryland (1982). R. C. Yates, Curves and Their Properties. National Council of Teachers of Mathematics (1952). C. Y. Wang, Shape classification of the parametric cubic curve and parametric B-spline cubic curve. Computer Aided Design, 13(4), 199-206 ( 1981 ). Su Bu-qing and Liu Ding-yuan, An aftine invariant and its application in computational geometry. Scientia Sinica (Series A) 24(3), 259-267 (March 1983). Su Bu-qing and Liu Ding-yuan, Computational Geometry: Curve and Surface Modeling, Academic Press, Inc., Boston (1989). M. Stone and T. DeRose, A geometric characterization of parametric cubic curves. ACM Transactions on Graphics, 8(3), 147-163 (July 1989). K. M. Daniels, Monotonic Partitioning for Curve Filling, Master's Thesis, Department of Computer Science, University of Lowell (May 1990). H. Flanders, A proof of Minkowski's inequality for convex curves. Amer. Math. Monthly 75, 581-593 (1968). H. Poritsky, Convex Spaces Associated with a Family of Linear Inequalities. Convexity: Proceedings of Symposia in Pure Mathematics, Vol. VII. American Mathematical Society, Rhode Island (1963). I. M. Yaglom and Boltyanskii, Convex Figures. Holt, Rinehart and Winston, New York ( 1961 ). L. Piegl, On NURBSwA survey, 1EEE Comp. Gr. Appl. 11( 1), 55-71 ( 1991 ). M. A. Penna and R. R. Patterson, Projective Geometry and its Applications to Computer Graphics. Prentice-Hall, Englewood Cliffs, NJ (1986). C. deBoor, On calculating with B-splines. J. Approx. Theory6(No. 1), 50-62 (July 1972). M. G. Cox, The numerical evaluation of B-splines. J. Institute for Math. and its Applications 10(2), 134-149 (1972). R.D. Bergeron, Transforming Non-uniform B-splines to Uniform B-splines, Technical Report 9 I- 16, Department of Computer Science, University of New Hampshire (June 1991).