A planar cubic Bézier spiral

A planar cubic Bézier spiral

JOURNAL OF COMPUTATIONAL AND APPLIED MATHEMATICS Journal ELSEVIER of Computational and Applied Mathematics 72 (1996) 85-100 A planar cubic Bkzi...

981KB Sizes 0 Downloads 50 Views

JOURNAL OF COMPUTATIONAL AND APPLIED MATHEMATICS

Journal

ELSEVIER

of Computational

and Applied

Mathematics

72 (1996) 85-100

A planar cubic Bkzier spiral D.J. Walton*, D.S. Meek Department of Computer Science, University of Manitoba, Received

Winnipeg, Man., Canada R3T 2N2

28 June 1995; revised 26 October

1995

Abstract A planar cubic BCzier curve segment that is a spiral, i.e., its curvature varies monotonically with arc-length, is discussed. Since this curve segment does not have cusps, loops, and inflection points (except for a single inflection point at its beginning), it is suitable for applications such as highway design, in which the clothoid has been traditionally used. Since it is polynomial, it can be conveniently incorporated in CAD systems that are based on B-splines, BCzier curves, or NURBS (nonuniform rational B-splines) and is thus suitable for general curve design applications in which fair curves are important. Keywords: AMS

Cubic Bkzier spiral; Monotone

classification:

curvature

65D17; 68UO7

1. Introduction

Cubic B-splines and Bi?zier curves are used extensively for computer-aided design (CAD) and computer-aided geometric design (CAGD) applications. Since they are polynomial, resulting algorithms are convenient for implementation in an interactive computer graphics environment. However, their polynomial nature causes problems in obtaining desirable shapes. Cubic curve segments may have cusps, loops, and up to two inflection points [S, 11,141. Splines with shape parameters such as Beta-splines [2] and Nu-splines [9] have been developed as alternatives to B-splines and BCzier curves. A fair curve should only have curvature extrema where explicitly desired by the designer [4]. B-splines and Bkzier curves do not normally allow this. However, it can be accomplished when designing with cubic Bkzier spirals. The problem in controlling the shape of a polynomial spline is related to the complicated nature of its curvature to arc-length relationship. For some applications, such as the design of highways,

* Corresponding

author.

e-mail: [email protected].

0377-0427/96/$15.00 0 1996 Elsevier Science B.V. All rights reserved SSDI 0377-0427(95)00246-4

D.J. Walton, D.S. Meek/Journal

86

of Computational and Applied Mathematics 72 (1996) 85-100

railways or robot trajectories, it is desirable that the curvature vary monotonically with arc-length. The clothoid or Cornu spiral has been used in highway design for many years [S]. Baass identified five transition curve cases in highway design, namely, straight line to circle, circle to circle with a (broken back) C transition, circle to circle with an S transition, straight line to straight line, and circle to circle where one circle lies inside the other with a C (oval) transition [l]. He recommends the use of clothoid templates because of the linear relationship between the curvature and arc-length of a clothoid. Computational methods that are suitable for implementation on a microcomputer to obtain these clothoid transition segments have since been developed [7]. Control polygon approaches based on guided clothoid splines for general curve design and for highway design in particular have been developed [12,13]. The purpose of this paper is to introduce a planar cubic Bezier curve segment that is a spiral, i.e., its curvature varies monotonically with arc-length. Since this curve segment does not have cusps, loops, and inflection points (except for a single inflection point at its beginning), it is suitable for applications such as highway design, in which the clothoid has been traditionally used. Since it is polynomial, it can be conveniently incorporated in CAD systems that are based on B-splines, Bezier curves, or NURBS (nonuniform rational B-splines) and is thus suitable for general curve design for applications in which fair curves are important. Notation and conventions as used in this paper are defined in Section 2. The cubic Btzier spiral is defined in Section 3. Its use for the various transitions encountered in general curve and highway design are analysed in Section 4. Section 5 contains a discussion of its potential application and mentions related work in progress.

2. Notation and conventions The following notation and conventions are used. The dot product of two vectors, V and W is V- W. The norm of a vector V is 11VII. Positive angles are measured anti-clockwise. If T is the unit tangent vector to Q(u) at u, then the orientation of the unit normal vector N to Q(u) at u is such that the angle measured anti-clockwise from T to N is rc/2. Although the notation Vx W usually represents a vector perpendicular to the plane of V and W, in this paper it is used for the scalar quantity IIVII IIWI sin 8 where 0 is the anti-clockwise angle from vector V to vector W. The signed curvature of a plane curve Q(u) is [2] +)

=

elc4 x P(4 Ilel(4113 .

(1)

The signed radius is the reciprocal of (1). A G2 point of contact of two curves (where a curve may be a straight line, a circle, or a cubic Bezier spiral) is a point where the two curves meet and where their unit tangent vectors and signed curvatures match.

3. The cubic BCzier spiral The cubic Bezier spiral is defined in the following theorem.

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

87

Theorem 3.1. Given a beginning point, BO, beginning and ending unit tangent vectors, T and TI respectively, and an ending curvature value, c, define the cubic Bezier curve Q(u) = Bo(l

- u)~ + 3BI(1 - U)~U+ 3B2(1 - u)u2 + B3u3,

0 < u < 1,

(2)

with (3)

5tan0 B3

=B2

fTTl,

where 8 is the anti-clockwise anglefrom T to TI. It is assumed that the centre of the circle of curvature at B3 is to the left of the directed line through B3 in the direction of TI, i.e., c > 0. The opposite case, i.e., c -=c0, can be defined analogously. The parameter is chosen so that increasing u gives increasing magnitude of curvature. Note the dot and cross product results (in keeping with the conventions mentioned in Section 2). T. TI = cos 0 > 0,

TX TI = sin 8 > 0.

This cubic Bezier has the following el(0) ___ = T, follows Ilel(O)ll

(6)

properties:

because

T is a unit vector parallel to Q’(O),

(8)

K(0) = 0, el(1) ___

llelU,ll

= T, , follows

because

TI is a unit vector parallel to Q’(l),

x(l) = c,

(10)

7c’(l) = 0,

(11)

and tc’(u)#O

forOdu
(12)

Proof. It follows from Eq. (2) that Q’(U)

=

Substitution

elc4 =

3(B, -B,)(l

-

u)~

+

6(B2 - B,)(l

-U)U

of Eqs. (3)-(5) into Eq. (13) and regrouping

:s’,‘,“,“,“B (1 - u2) T + u2 y

TI .

+

3(B3 -B2)u2.

(13)

yield (14)

88

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

From (14), taking the dot product of Q’(U)with itself, yields

IIQYW= ,,‘,‘,:“;;s;

e (25 + 10u2 (6 cos2 8 - 5) + ~~(25 - 24 cos2 0)} .

(15)

Differentiation of Eq. (14) gives p(u)

=

-GUT+

l”;euTl.

(16)

It follows from (1) and (14)-(16) that the signed curvature of Q(U) is 216~ cos3 8 ‘(‘) = (25 + 10u2 (6 ~0s’ 8 - 5) + u4 (25 - 24 cos2 0)}3’2’ Eqs. (7)-(10) follow by substitution produces

of u = 0 and u = 1 into (14) and (17). Differentiation

216cf(;l) cos3 19 “(‘) = (25 + 10u2 (6 COS2 0 - 5) + u4 (25 - 24 COST

6)}5'2'

(17) of (17)

(18)

where f(J) = 25 - 20(6 cos2&5)L5(25-24cos28)i12,

3,=u2.

(19)

Eq. (11) follows by substituting u = 1 into (19) and the result into (18). It also follows from Eq. (19) that f(0) = 25 > 0, and limn+a, f(n) < 0, hence f(n) has only one positive zero. Since this zero occurs at 2 = 1, it follows that f(A), and hence K’(U)does not change sign on [0, l] from which (12) follows. 0 Corollary 3.2. If c > 0 thy

0 < 8 < 42.

Proof. This result follows immediately from (6).

0

Corollary 3.3. The cubic BSzier spiral has five degrees of freedom. Proof. The five degrees of freedom are: two for B o, and one for each of c, 0, and the unit tangent vector T. The unit tangent vector T1 is determined by T and 8. 0

4. Joining the cubic BCzier spiral to circles and lines

The use of a cubic Bezier spiral for the five cases that occur in highway design is now examined. As was done with clothoids, a single spiral is used for the first and last cases; pairs of spirals are used for the second through fourth cases. There are two possible solutions for each of the first three cases. One solution has been arbitrarily selected in each of these cases since an analogous analysis will produce the alternative solution if desired. The fourth case has many possible solutions. A unique solution is obtained by allowing the curve designer to specify a curvature value where the

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

89

two spirals meet. The fifth case cannot always be solved. The results for the first four cases are expressed as Theorems 4.1-4.4; those theorems are followed by a discussion of the fifth case. Theorem 4.1. Given a point, P, a unit vector, T, and a circle 52 of radius r > 0 centered at C where T x (C - P) > 0. Let L be the straight line through P parallel to T, let d be the perpendicular distance from C to L, and let G = C - P. If r < d, then there is a unique cubic Bbzier spiral as de$ned in Theorem 3.1, and shown in Fig. 1, that joins L to D such that the points of contact are G2. The angle from T to T1 of this cubic Bezier spiral satis$es

$tanf?sinO+cosB-d=O. Proof. By convention,

(20)

r

the unit normal vector at Q(O) and thus at P is given by

G - (G. T)T IV= IIG - (G.T)TII



Since Q(O) lies on L, and Q(1) lies on CJit follows that Q(O) = P + aT

(21)

Q(l) = P + (Ga T + r sin 0) T + (d - r cos 0)N.

(22)

and

From Theorem 3.1 it follows that

Q&Y = Bo and

/ I

,

*e----s -\

\ \

I

\

I

\

I

\

I

\

I

Fig. 1. Straight

\

line to circle transition.

90

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

Substitution of these into (21) and (22), elimination of P, and subsequent rearrangement oT+

y;;-ff

T +

5r tan 19

T1 -(G.T+rsinB)T-(d-rcosB)N=O.

T

of the above with IV, observing that T.N = 0,

Eq. (20) follows upon taking the dot product T1 . N = sin 8, and dividing by r. Let q(8) =$tan(3sin8

produce

+ cos0 -t.

Now q(O) = 1 - d/r < 0,

q(f3 + 7r/2) -+ co > 0, and

q’(0)= p&)(5 -4cos2tq

>o,

from which it follows that (20) has a unique solution for 0 < 8 < x/2. The formula for c is o=G.T+------

4r sin 8

9

25r tan f3

??

27 cos 0 ’

Theorem 4.2. Given two circles a,,, sZ1 centred at C,,, Cl with radii r. < 0, rl > 0. If one circle does not enclose the other, i.e., ( lrll - lrol ) = (rl + roI < llCl - Co(l then the two circles can be joined by a pair of cubic Bbzier spirals forming a C-shaped curve such that all points of contact are G2 as shown in Fig. 2.

Proof. Let the cubic Bezier spiral that meets CJobe Qo(u), and the one that meets s2I be Qr (u). Two cubic Bezier spirals have ten degrees of freedom. To ensure a G2 match where the two cubic Btzier

I

.

_---__

/ / ,

.

\ \ \ \

I /

T

I

-T Fig. 2. Circle to circle transition

with broken

back C.

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

91

spirals meet, let them be joined at their beginning points, B,, (where they both have zero curvature), and let - T and T be the beginning unit tangent vectors of QO(u) and Q1 (u) respectively. There are thus seven remaining degrees of freedom. Since QO(l) and Q1(l) are each free to move on the circumference of a circle, their G2 points of contact each impose three constraints on Q,,(u) and Q1(u). There is still one remaining degree of freedom. Let To and T1 be the ending unit tangent vectors of QO(u) and Q1 (u) respectively. According to Theorem 3.1, the angles from -T to To and from T to T1 are & and Q1 respectively where -x/2 < 13~< 0 and 0 < (Jr < n/2. The remaining degree of freedom is used to set 6’= 19~= - &; 0 < 8 < rc/2. This not only simplifies subsequent algebraic expressions, but also balances the angle of tangent of the two cubic Bezier spirals. It follows now from Theorem 3.1 that Q,,(l) = B,, + 2;;;rsn:,

T - 5ro 3” 6’To

Ql (1) = B. + ‘:;l,‘,a,“,”

T + 5r1 7

and T1

or, by subtraction,

Ql(l> - QoU =

25 (rl - ro) tan 19 T+ y 27 COS 8

(rlT1 + roTo).

(23)

It is assumed (arbitrarily) that the orientation of T is such that T. (Cl - Co) > 0. This causes one of two possible solutions to be selected. If desired, the other solution may be selected by choosing the orientation of T such that T. (Cl - Co) < 0. It now follows that

{(QI (1) - Cd - (Qo(l> - Co>>.A’ = - PI + ~0)~0s 0

(24)

{
(25)

and - CO>>. T = h

- ~0) sin 6

where To-N=

T,.N=sin8,

T1.T=

-T,.T=

cos8.

(26)

It follows from (23) and (26) that

(Ql(l> - QoU))-N =

5 tan:

sin 0 (yl + ro)

and (Ql(l)

_

Qo(l)).T=

25(r1 --“)tan8+5”‘“8(qpro) 27 cos 0

which, upon substitution (cl - C,).N

= 0-1 +

into (24) and (25) and subsequent

r&l

(0)

rearrangement,

produce (27)

92

D.J. Walton, D.S. Meek/Journal

of Computational and Applied Mathematics 72 (1996) 85-100

and (CI - G) . T = @I - yo) gz (0)

(28)

where g1(8)=~tan~sin8+cos~ and 25 tan 6’ 4 sin 6’ gz@) = ____ - 27costI 9 . From (27) and (28), the pair of cubic Bezier spirals is obtained upon solution of @I + r0)2 WJ))”

+ (rt - r0)2 {s2(@>” = IIG - C0112.

(29)

Let 4(e) = (r-1+ r0)2 {gl(e)Y + (rl - rcJ2 {g2(W2 - IIG - Gl12. Now 4(O) = (rl + r0)2 -

4(e)>o

IICI - Gl12 < 0 for lrl + rd < llCl - GII ,

as8+7t/2,

and 4’(e) = 2(r, + G2 gl(e)g;(e)

+ 2 (rr - r0)2 g2(e) g;(e) > 0

since k(e) > 0,

g;(e)=+(l

+5tan28)sin0>0,

g2(e) = (13 + 12 sin2 0)

sine 27 COS2

6

> 0

and g;(e) =

25+25sin20-12cos48,0 27 COS3 8

Hence Eq. (29) has a unique solution for 0 < 8 < x/2 and IrI + rOI < I)C1 - C,,li .

??

The two cubic Bezier spirals are obtained by solving (29) for 8, determining T, N, To, and T1 from (27), (28) and (26), and then applying Theorem 3.1. Theorem 4.3. Given two circles sZO, D 1 centred at C,, C1 with radii ro, rl > 0. (This selects one of two possible solutions; for the other solution, let ro, rl < 0.) If the centres of the circles are further apart than the sum of their radii, i.e., IrI + rOI < /C1 - C,ll, then the two circles can be joined by a pair of cubic Bbzier spiralsforming an S-shaped curve such that all points of contact are G2 as shown in Fig. 3.

D.J. Walton, D.S. MeekJJournal

of Computational

and Applied Mathematics

_---_ /

H0

I

-. \

72 (1996) 85-100

93

\ \

,

\

I

\

I

\

I

I

I

\ /

\

/

\

. --__*

Fig. 3. Circle to circle transition

with an S.

Proof. Let the cubic Bezier spiral that meets sZ0 be Q~(u), and the one that meets Q1 be Q1(u). The

following equation is obtained by an argument analogous to that in the proof of Theorem 4.2.

QIU, - Qo(l> =

25 (rr + ~0)tan 8 T+ 7 27 cos 8

(rlT1 - roTo).

It is assumed (arbitrarily) that the orientation of T is such that T.(C1 - Co) > 0. Choosing the orientation of T such that Ta(C1 - Co) < 0 produces the same result but with Qo(u) and Q1(u) reversed. It now follows that

{(QI (1) - Cd -
-To.N=sin8,

T1.T=

-T,.T=cosQ.

Analogous to the proof of Theorem 4.2, it is found that the pair of cubic Bezier spirals is determined upon solution of the equation (rl + r0)2 C{sr(W2 + (s2VO)‘l = IIG - Col12, 0 < 0 < 7G,

(30)

where gl(6) and g2(@ are defined by (27) and (28). By an analysis similar to that in the proof of Theorem 4.2, it follows that (30) has a unique solution for 0 < 8 < 7c/2 and Irl + rol < IlCl - Coil.

0

Analogous to the previous case, the two cubic Bezier spirals are obtained by solving (30) for 19, determining T, N, To, and T1, and then applying Theorem 3.1. The following theorem gives the result for the transition from one straight line to another.

94

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

Theorem 4.4. Given three points PO, PI, and P. Let P-P,

P-P1

To = IIP-Poll’

T1 = I/P - PII(

and let c1< 7cbe the angle at P formed by PO, P, and PI. For any value c > 0, the pair of cubic Bezier spirals Qo(u) = Bo(l - u)” + 3BI(1 - u)“u + 3B2(1 - u)u” + B3u3,

0 < u d 1,

(31)

&(u> =Ao(l

0 < u < 1,

(32)

and

- u)” + 3Al(l

u)‘u + 3A2(1 - u)u2 + A3u3,

with (33)

(34)

(35)

(36)

(37)

A,=‘&-$+,

(38)

where I9 = $(Tc - a), TI - To T=

IITI -Toll’

Bo=P-noTo, Ao=P-ooTl, and 40 tan 8

CJ= 27~~0s 8’

(39)

joins the two directed lines emanating from PO and PI, and meeting at B3 = A,, such that all points of contact are G2 as shown in Fig. 4; the absolute value of the curvature of the two spirals at their joint is c.

D.J. Walton, D.S. Meek/Journal

of Computational

and Applied Mathematics

72 (1996) 85-100

95

Fig. 4. Straight line to straight line transition.

Proof. Two cubic Bezier spirals have ten degrees of freedom. Let T and c be the unit tangent vector and signed curvature respectively of Q(u) at u = 1. To ensure a G2 match where QO(u) and Qr(u) meet, the unit tangent vector and signed curvature of Qr (u) should respectively be - T and -c at u = 1, together with the condition

(40)

Qo(l> = QI(~).

There are thus six remaining degrees of freedom. Since Qo(0) and QI (0) are each free to move along a straight line, i.e., B. =P-uoTo,

(41)

and A0 = P - alTl

,

(42)

and since both Qo(0) and QI (0) have zero curvature at their beginning points, the G2 requirements at these points of contact each impose two constraints on Qo(u) and Qr(u). There are still two remaining degrees of freedom. The beginning unit tangent vectors of Qo(u) and Qr(u) are To and T1 respectively. According to Theorem 3.1, the angles from To to T and from T, to - T are o. and 611respectively where 0 < 19~< rc/2 and --7c/2 < 19~< 0. One of the remaining degrees of freedom is used to set 13= I30= - 8r, hence 8 = i(rr - a) and T = (To - T1)/(ll To - T1 II). This not only simplifies subsequent algebraic expressions, but also balances the angle of tangent of the two cubic Bezier spirals. The other remaining degree of freedom c is left for the curve designer to use as a shape parameter by choosing a value for it. If follows now from (40) in conjunction with (31) to (38), (41), and (42) that clT1 - aoTo = ;;czfs;

(T, - To) - F

T.

(43)

The theorem follows upon taking the dot product of (43) with T and N, the unit tangent and normal vectors to Qo(u) and QI(u) at u = 1, where To-T=

-Tl.T=cosO,

To-N=

T1.N=

-sinO.

0

96

D.J. Walton, D.S. Meek/Journal

of Computational and Applied Mathematics 72 (1996) 85-100

Corollary 4.5. It follows from (39) that the choice 40 tan 6 ’ = 27ocos8’ where CT= min( IIP- Poll, I\P- PI II),lets one of the spirals start at whichever ofPO or PI is closest to P.

For the fifth case (circle to circle, one circle inside the other), a transition curve with six degrees of freedom is required for G2 contact with the circles. The beginning point, B,, of the cubic Bezier spiral cannot be used as a point of contact because the curvature there is 0. An additional degree of freedom is the parameter value of the unknown point of contact of the larger circle with the arc of the cubic Bezier spiral. The radii are of the same sign and are assumed to be positive. An analogous analysis can be done for negative radii. This case does not always seem to have a solution. Furthermore, the algebra required to prove uniqueness should a solution exist, seems unwieldy and has not been carried out at this time. This case is not as important as the previous four for general curve design but is included because it is used in highway design. Consider two circles Q,,, 9i centred at Co, C1 with radii r. > rl > 0 and such that sZ1 is completely contained inside Qo. It is desirable to join the two circles by a single cubic Bezier spiral such that both points of contact are G2 as shown in Fig. 5. Let the cubic Bezier spiral as defined in Theorem 3.1 meet 0, at u = t and 521 at u = 1 respectively. Let the angle from T to the unit tangent

Fig. 5. Circle to circle transition

with a single spiral.

D.J. Walton, D.S. Meek/Journal of Computational and Applied Mathematics 72 (1996) 85-100

97

vector at u = t be 4. It follows from (17) that

(25 + 10t2(6cos28-

216t cos3 13 5) + t4(25 -24c0s~fJ)}~‘~ =;’

(44)

Observe that if 8 is known then (44) can be solved uniquely for t in (0,l) since, by Theorem 3.1, the derivative with respect to t of the left-hand side does not change sign on (0,l); for t = 0, the left-hand side is zero ( rl/rO). By taking the dot product of Q’(U)at u = t with the unit normal vector, N, and unit tangent vector, T, of Q(U) at u = 0, it follows from (14) that Q’(t).iV=~r1t2tan0sin8 and Q’(t).T=

r,(l - t2)E

++r,t’sine,

hence tan 4 =

6t2 sin 0 cos 6’

(45)

5(1-t2)+6t2cos28’

It follows from Theorem 3.1 that Q(l) = B,, + ‘;;l,‘,“s”B” T-t

5r1 tan 8 T 9 1

and, writing Q(t) in monomial form, that Q(t) = B0 + “;;;toe Subtraction

Tt + ;;;m;;

(6Tr cos 8 - 5T) t3.

of Q(t) from Q(l) with subsequent rearrangement

yields

Q(l) - Q(t) = 2~~l,k”,“B”(2 - 3t) T + $rl T1 tan 8 -

;;;m;;

(6T1 cos 19- 5T) t3.

(46)

It also follows that {(Q(l) - C,) - (Q(t) - Co)} .N = - (rl cos 0 - r. cos 4)

(47)

{(Q(l) - C,) - (Q(t) - Co)). T = r1 sin 8 - YOsin 4.

(48)

and

98

D.J. Walton, D.S. MeekJJournal

of Computational

and Applied Mathematics

72 (1996) 85-100

Taking the dot product of (46) with T and N with subsequent substitution rearrangement produce gl(Q) = (C, - CO).N =$rl(l g,(O) = (C, - Co)- T =

into (47) and (48) and

+ rl cost3 - rocos4,

- t3)tanQsin0

‘,l,lsm;; {10 - 15t - (6 cos2 Q - 5) t3}

(49)

hence the cubic Bezier spiral, if it exists, is obtained upon solution of

4(Q)= {sm}” +

{s2(@>"

- IlCl - Col12 = 0.

(50)

Eqs. (44), (45), and (50) are three simultaneous nonlinear equations in t, 4, and 13.If a solution exists, it can be found numerically by treating (50) as a nonlinear equation in a single unknown, because for any given 8, t can be found from (44), 4 can be found from (45), so q(8) can be evaluated.

5. Conclusion The cubic Btzier spiral is useful in curve design because it is of low degree; being polynomial, unlike the clothoid, it is a special case of a NURBS curve. Since straight line segments and circular arcs also have NURBS representations [lo], curves designed using a combination of cubic Bezier spirals, circular arcs, and straight line segments can be represented entirely by NURBS. Spirals, including the cubic Bezier spiral, are less flexible than polynomial curves in general. When joining three circles in a row, for example, it is possible that the spiral from the left circle to the centre circle may meet the centre circle past the starting point of the spiral joining the centre circle to the right circle. Such conditions can be detected mathematically and may mean that a reasonable curve does not exist. These situations may be remedied by repositioning the circles or changing their radii. The same control polygon approach to curve design with clothoids [13] is applicable to curve design with cubic Bezier spirals. The spirals discussed in all the cases but one of Section 4 are complete Bezier curves, i.e., their parametric values range from 0 to 1. The fifth case uses a parametric value that ranges from a positive value less than one, to 1. However, using available subdivision algorithms this spiral may be reparameterized so that its parameter will range from 0 to 1 [3]. The cubic Bezier spiral is a reasonable alternative to the clothoid for applications such as highway and railway design. Fig. 6 shows the cubic Bezier spiral’s curvature vs. arc-length plots for values of 8 from 10”to 80” in

Fig. 6. Curvature

vs. arc-length

plots.

D.J. Walton, D.S. Meek/Journal of Computational and Applied Mathematics 72 (1996) 85-100

99

steps of 10”. The curve has been normalized to have unit curvature at u = 1. The total arc-length for each plot has been scaled to equal the total arc-length of the 0 = 10” curve so as to fit all the plots on the same system of axes. It can be observed that for 8 < 50” the curvature vs. arc-length relationship for the cubic Bezier spiral does not deviate very much from being linear. In highway design 8 would rarely equal or exceed 40” [S]. The curvature vs. arc-length relationship for the clothoid is linear (indicated as a broken straight line in Fig. 6). Since Bezier curves are affine invariant, a cubic Bezier spiral can be used in a coordinate-free manner; it is not necessary to transform it to a standard form for evaluation. There seem to be limitations in extending the idea developed here into 3D nonplanar cases. One limitation is the restriction of the first three Bezier control points to a straight line so that the curvature at the beginning of the spiral is zero. This restriction causes the spiral to be planar. A simple way of joining two circles whose planes are not parallel would be to introduce some twist at the beginning points of the pair of transitional spirals (where their curvatures are zero). This may however not always be satisfactory, and may also not always work. It can be noted that this limitation is also inherent in the clothoid which by definition is a planar curve. In highway design practice the limitations of extensions into 3D seem to be overcome by designing horizontal and vertical alignments separately but not independently [6]. Work in progress includes an investigation of the behaviour of the cubic Bezier spiral when the point of maximum curvature is moved to values of u greater than 1. By moving the point of maximum curvature away from 1 it may be possible to obtain a curvature vs. arc-length relationship that is closer to linear. Further work will also include research into ways of overcoming the limitations in extending the idea into 3D nonplanar cases since such connections are useful in many applications.

Acknowledgements

This work was supported by the Natural Sciences and Engineering Research Council of Canada. Helpful comments by the referee are gratefully acknowledged.

References [l] K.G. Baass, The use of clothoid templates in highway design, Transportation Forum 1 (1984) 47752. [2] B.A. Barsky, Computer Graphics and Geometric Modelling using Beta-Splines (Springer, New York, 1988). [3] R.H. Bartels, J.C. Beatty and B.A. Barsky, An Introduction to Splines for Use in Computer Graphics and Geometric Modeling (Morgan Kaufmann, Los Altos, CA, 1987). [4] G. Farin, Curves and Surfacesfor Computer Aided Geometric Design: A Practical Guide (Academic Press, San Diego, 3rd ed., 1993). [S] P. Hartman, The highway spiral for combining curves for different radii, Trans. Amer. Sot. Civil Engrg. 122 (1957) 3899409. [6] T.F. Hickerson, Route Location and Design (McGraw-Hill, New York, 5th ed., 1964). [7] D.S. Meek and D.J. Walton, The use of Cornu spirals in drawing planar curves of controlled curvature, J. Comput. Appt. Math. 25 (1989) 69-78. [S] D.S. Meek and D.J. Walton, Shape determination of planar uniform cubic B-spline segments, Computer-Aided Design 22 (1990) 4344441.

100

D.J. Walton, D.S. Meek/Journal of Computational and Applied Mathematics 72 (1996) 85-100

[9] G.M. Nielson, Rectangular Nu-splines, IEEE Comput. Graphics Appl. 6 (2) (1986) 35-40. [lo] L. Piegl, On NURBS: a survey, IEEE Comput. Graphics Appl. 11 (1) (1991) 55-71. [l l] M. Stone and T. DeRose, Characterising cubic BCzier curves, ACM Trans. Graphics 8 (3) (1989) 147-163. [12] D.J. Walton and D.S. Meek, Computer-aided design for horizontal alignment, ASCE J. Transportation Engrg. 115 (1989) 41 l-424. [13] D.J. Walton and D.S. Meek, Clothoidal splines, Comput. Graphics 14 (1990) 95-100. [14] C.Y. Wang, Shape classification of the parametric cubic curve and the parametric B-spline cubic curve, ComputerAided Design 13 (1981) 199-206.