Computer-Aided Design 42 (2010) 1117–1124
Contents lists available at ScienceDirect
Computer-Aided Design journal homepage: www.elsevier.com/locate/cad
Admissible regions for rational cubic spirals matching G2 Hermite data✩ Zulfiqar Habib a,∗ , Manabu Sakai b a
Department of Computer Science, FAST National University of Computer & Emerging Sciences, B-Block, Faisal Town, Lahore, Pakistan
b
Department of Mathematics & Computer Science, Kagoshima University, Kagoshima 890-0065, Japan
article
info
Article history: Received 4 February 2009 Accepted 8 July 2010 Keywords: Path planning Spiral Cubic Bézier G2 Hermite Computer-aided design (CAD) Computer graphics
abstract This paper finds reachable regions for a single segment of parametric rational cubic Bézier spiral matching G2 Hermite data. First we derive spiral conditions for rational cubics and then we use a free parameter to find the admissible region for a spiral segment with respect to the curvatures at its endpoints under the fixed positional and tangential end conditions. Spirals are curves of constant sign monotone curvature and therefore have the advantage that the minimum and maximum curvatures are at their endpoints only. © 2010 Elsevier Ltd. All rights reserved.
1. Introduction Parametric cubic Bézier curves are popular in CAD and CAGD (Computer Aided Geometric Design) applications because they are the lowest degree curves that allow inflection points, so they are suitable for the composition of G2 transition curves. Rational cubic Bézier curves are more useful than simple cubic Bézier curves because of their geometric properties and flexibility [1]. Many authors have described their use in different applications such as data fitting and font designing [2,3]. Fair path planning is one of the fundamental problems, with numerous applications in the fields of science, engineering and technology, such as satellite path planning, highway or railway designing, networks, robotics, GIS, navigation, CAD systems, collision detection and avoidance, animation, environmental design, communications and other disciplines [4]. One of the main approaches to path planning is through the use of fair curves, such as spiral functions [5,6]. The importance of using fair curves in the design process is well documented in the literature [7,8,3]. According to Farin [7], ‘‘Transitions are considered fair if they have no unwanted internal curvature extrema’’. It can be accomplished when designing with spiral function. Rational cubic curves,
✩ A preliminary version of this work was presented at ICET08 [Raza A. A., Habib Z., and Sakai M., Interpolation with rational cubic spirals, In: Proceedings of the 4th IEEE International Conference on Emerging Technologies, Islamabad, Pakistan, October, 2008, http://ceme.edu.pk/IEEE/icet2008/index.htm]. ∗ Corresponding author. Tel.: +92 42 111128128. E-mail addresses:
[email protected],
[email protected] (Z. Habib),
[email protected] (M. Sakai).
0010-4485/$ – see front matter © 2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.cad.2010.07.006
although visually pleasing, are not always helpful since they might have unwanted cusps, loops, up to two inflection points, and curvature extrema [9–11]. Several Hermite-type and osculatory interpolation methods for rational cubics are presented in ([12], p. 150) and [13,14]. Many authors have discussed the possibilities of cubic and PH quintic splines to join two circles with one circle completely inside the other, i.e., spiral segment according to Kneser’s theorem [15]. The single curve of G2 contact has been considered by [16] but it may have unwanted internal curvature extrema. Its spiral form of G2 contact is then derived in [17,18]. However, it does not match Hermite data exactly, i.e., the endpoint of the segment can not be fixed. Dietz and Piper [19] have numerically considered parametric cubic Bézier curve of monotone curvature matching G2 Hermite data. They have computed admissible regions for cubic spirals and developed tables of values of tangent angles and curvatures at the end points for the selection of a cubic’s inner control points so as to match given G2 Hermite conditions. Their results have enabled us to use a single cubic curve rather than two segments. However, their numerically obtained spiral regions would become smaller or even empty as the tangent angles at endpoints become relatively equal. This work has been extended by Dietz et al. in [20] by using a rational cubic function. They used two free parameters and achieved more spiral regions by adopting a long and tedious procedure of finding the optimal rational cubic spiral. According to them, ‘‘Proper care must be taken to use an appropriate measure for optimization and to apply appropriate constraints so that the algorithm is not too susceptible to numerical errors arising from various typical curvature behaviors.’’
1118
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
This paper uses a rational cubic Bézier curve for the spiral segment matching G2 Hermite data consisting of positions, tangents, and curvatures. We derive spiral conditions on the whole segment and use a free parameter to find the admissible region for a spiral segment with respect to the curvatures at its endpoints under fixed positional and tangential end conditions, in a stable manner while preserving all the geometric features to overcome the above mentioned problems. 2. Background 2.1. Notations and conventions To aid concise writing of mathematical expressions, the symbol
× is used to denote the signed z-component of the usual threedimensional cross-product of two vectors in the xy plane, e.g., a × b = ax by − ay bx = ‖a‖‖b‖ sin θ , where θ is the counterclockwise angle from a to b. a · b denotes the usual inner product. The signed curvature of a parametric curve P (t ) in the plane is
κ(t ) =
P ′ (t ) × P ′′ (t )
, (2.1) ‖P ′ (t )‖3 when ‖P ′ (t )‖ is non-zero. Positive curvature has the center of curvature on the left as one traverses the curve in the direction of increasing parameter. For non-zero curvature, the radius of curvature, positive by convention, is 1/|κ(t )|. The derivative κ ′ (t ) of the curvature in (2.1) yields
κ ′ (t ) =
φ(t ) , ‖P ′ (t )‖5
(2.2)
where
φ(t ) = ‖P ′ (t )‖2
d dt
{P ′ (t ) × P ′′ (t )}
The term ‘spiral’ refers to a curved line segment whose curvature varies monotonically with constant sign. A G2 point of contact of two curves is a point where the two curves meet and where their unit tangent vectors and signed curvatures match. The term ‘spiral regions’ refers to admissible regions in curvature space for a spiral segment with respect to the curvatures at its endpoints and given tangent angles at these endpoints. Based on Kneser’s theorem [15], any circle of curvature of a spiral encloses all circles of smaller curvature and is enclosed by all circles of larger curvature. So we cannot find the transition curve with a single spiral segment between two tangent circles or two intersecting circles. The general form of a rational Bézier curve of degree n is discussed in [7] and is represented as
P (t ) =
w
i=0 n
∑
n i pi Bi
(t ) ,
wi Bni (t )
Bni (t ) =
n (1 − t )n−i t i , i
i =0
0 ≤ t ≤ 1,
cubic Bézier curve of standard form with w0 = w3 = 1. One more degree of freedom is reduced with w1 = w2 = w , to simplify the analysis, leaving behind a single weight and quadratic denominator in a rational cubic (2.3). This form of a rational cubic was first considered by Cremona in 1859 [7,21]. It was also named the T-conic by Rowin [22] in 1964, as quoted by Forrest [23]. The Cremona form allows for easy analysis of the asymptotes and behavior of the curve in [0,1], which is enough for the desired results. Finally, the rational cubic is given by P (t ) =
− 3{P ′ (t ) × P ′′ (t )} × {P ′ (t ) · P ′′ (t )}.
n ∑
Fig. 1. A rational cubic Bézier spiral transition between two circles matching G2 Hermite conditions.
(2.3)
where pi and wi , i = 0, . . . , n, are control points and scalar weights, respectively. 2.2. Rational cubic Bézier curve From (2.3), a planar rational cubic Bézier curve can be represented for n = 3 as P (t )(=(x(t ), y(t ))). We assume that all the control points are distinct. This curve has four control points pi , i = 0, . . . , 3 and four weights wi , i = 0, . . . , 3. From these twelve degrees of freedom we can scale the weights and reparameterize the curve to reduce two degrees of freedom, yielding a rational
(1 − t )3 p0 + 3wt (1 − t )2 p1 + 3wt 2 (1 − t ) p2 + t 3 p3 , (1 − t )2 + (3w − 1)t (1 − t ) + t 2 0 ≤ t ≤ 1.
(2.4)
Without loss of generality, we can transform the shape to normalize it, as shown in Fig. 1. In this paper, we assume that 1. the endpoints of cubic segment are p0 = (−1, 0) and p3 = (1, 0). 2. the middle control points are p1 = (u1 , v1 ) and p2 = (u2 , v2 ). 3. the tangent angle between the tangent vector and the vector (1, 0) at t = 0 is denoted by φ0 , while the tangent angle at t = 1 is denoted by φ1 , as shown in Fig. 1. 4. the curvatures at the endpoints are κ0 and κ1 with their larger and smaller circles of curvatures Ω0 and Ω1 , respectively. The values for φ0 and φ1 are constrained so that 0 < φ0 < φ1 < π /2. These constraints restrict our spiral to spiral segment of increasing curvature and the intersection of the tangent lines at its endpoints, as shown in Fig. 1, exists. The point of intersection of tangent lines at the endpoints of parametric cubic segment and the horizontal axes passing through these endpoints form a triangle. We consider the following ratios f0 =
‖P ′ (0)‖ l0
,
f1 =
‖P ′ (1)‖ l1
for use in the further procedure, where l0 =
3m sin(φ0 )
,
l1 =
for m=
2 sin φ0 sin φ1 3 sin(φ0 + φ1 )
,
3m sin(φ1 )
,
(2.5)
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
are the lengths of the left and right hand sides of the triangle edges, respectively, and 3w(1 − u2 ) , ‖P ′ (1)‖ = , (2.6) cos φ0 cos φ1 are the magnitudes of the tangents at the endpoints of the cubic segment (2.4), respectively. Without any loss of degrees of freedom, the two control points p1 and p2 are now expressed in terms of f0 , f1 , φ0 , and φ1 as
‖P ′ (0)‖ =
p1 = p2 =
1
w 1
w
3w(1 + u1 )
(−1 + mf0 cot φ0 , −mf0 ), (2.7)
(1 − mf1 cot φ1 , −mf1 ).
3. Description of method The problem of finding a fair parametric rational cubic spiral transition curve between two circles Ω0 , Ω1 with given endpoints, tangents and curvatures at the endpoints can be solved in a Hermite-like manner. The outline of our analysis is first to derive the necessary and sufficient spiral conditions. These conditions are then used to determine the admissible regions for a spiral segment with respect to the curvatures κ0 , κ1 at its endpoints p0 , p3 and given tangent angles φ0 , φ1 at these endpoints, respectively.
with respect to the curvatures (κ0 , κ1 ) at its endpoints under fixed positional and tangential end conditions. From the formula of curvature in (2.1), the relations between parameters (f0 , f1 ) and end curvatures (κ0 , κ1 ) are given by
96(1 + s)4 sin φ0 sin φ1
For given end tangents and end curvature conditions, i.e., for each quadruple (φ0 , φ1 , κ0 , κ1 ), values of f0 , f1 , and w are sought so that the above system of equations is satisfied, and the resulting rational cubic curve (2.4) is a spiral. The first equation of (3.4) implies
×
12 −
s
12−i
.Hi (f0 , f1 ; φ0 , φ1 ).
(3.1)
i=0
The coefficients Hi (f0 , f1 ; φ0 , φ1 ), 0 ≤ i ≤ 12 are symmetric as H12−i (f0 , f1 ; φ0 , φ1 ) = −Hi (f1 , f0 ; φ1 , φ0 ),
0 ≤ i ≤ 6,
(3.2)
whose expressions in explicit forms are given in Appendix A. The problem of designing cubic spirals could be formulated analytically by finding conditions on the coefficients of the above 12th degree polynomial (for w = 1, the polynomial reduces to the quintic one) to ensure the non-positive zeros of (3.1). The sufficient spiral conditions are given in the following theorem. Theorem 3.1. The rational cubic curve of the form (2.4) is a spiral if min[Hi (f0 , f1 ; φ0 , φ1 ), −Hi (f1 , f0 ; φ1 , φ0 ), 0 ≤ i ≤ 6] ≥ 0.
(3.3)
Proof. From (3.2) and (3.3), all the coefficients Hi (f0 , f1 ; φ0 , φ1 ), 0 ≤ i ≤ 12 are non-negative. Therefore, by Descartes rule of signs ([24], pp. 439–443), the rational cubic curve (2.4) is a spiral if (3.3) holds. 3.2. Spiral regions on the endpoint curvatures The algebraically simple parameters (f0 , f1 ) do not give direct information on how to match or approximate given curvature values at the endpoints. This section considers the problem of finding an admissible region for a rational cubic spiral segment
κ0 f1 = (u2 − f02 ), d1 dw
u=w
3d1 d
κ0
,
(3.5)
converting the second equation into a monic quartic form g (f0 ) = 0, such that g (f0 ) = f04 − c2 f02 + c1 f0 + c0 ,
(3.6)
where 9d2 d2 w 4
κ κ
2 0 1
d κ1 − ,
c1 =
3
d2 d3 w 3
κ02 κ1
,
6d1 dw 2
, κ0 sin φ1 sin2 (φ0 + φ1 ) d= , w sin2 φ0 3 sin φ0 d1 = , d2 = d21 , (3.7) sin φ1 are all non-negative for κ1 ≥ d/3, which leads to a lower bound on w given by c2 =
wmin =
{1 − (1 − 3w)s + s2 }8 sin3 (φ0 + φ1 )
(3.4)
(3w − f0 ) sin φ1 sin2 (φ0 + φ1 ) κ1 = . f12 sin2 φ0
3.1. Spiral conditions
‖P ′ (t )‖5 κ ′ (t ) =
(3w − f1 ) sin φ0 sin2 (φ0 + φ1 ) , f02 sin2 φ1
κ0 =
c0 = Spiral conditions are imposed to guarantee the absence of any interior curvature extremum in the transition curve P (t ) in (2.4) on [0, 1], i.e., the derivative of curvature κ ′ (t ), defined in (2.2), has no zero on [0, 1]. Since there is no closed form for the roots of the derivative of its curvature (of degree 12 for our rational cubic case), we first transform the unit interval [0, 1] to [0, ∞) and then derive a spiral region with respect to the parameters introduced under the fixed tangent angles at the endpoints. The derivative κ ′ (t ) of the curvature in (2.2) for t = 1/(1 + s), s ≥ 0, yields
1119
sin φ1 sin2 (φ0 + φ1 ) 3κ1 sin2 φ0
.
(3.8)
The upper bound on w is not computed theoretically, but in practice, in none of the cases did we observe w over 3. Next we need to find the positive real solution of g (f0 ). For this its discriminant 1
(4λ3 − µ2 ), 27 should be non-negative, i.e., Disc =
(3.9)
4λ3 ≥ µ2 ,
(3.10)
where
λ = 12c0 + c22 , µ = 27c12 + 72c0 c2 − 2c23 . Further, g (f0 ) can be factorized as √ √ g (f0 ) = (f02 + pf0 + q)(f02 − pf0 + r ),
(3.11)
(3.12)
where r + q = p − c2 ,
c1 r −q= √ , p
qr = c0 .
(3.13)
Hence we have 1 c1 (i) q = p − c2 − √ , 2 p (ii)
r =
1 2
c1 p − c2 + √ p
,
(iii) p3 − 2c2 p2 + (c22 − 4c0 )p − c12 = 0.
(3.14)
1120
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
Theorem 3.2. For w ≥ wmin and Disc ≥ 0, where wmin and Disc are defined in (3.8) and (3.9), respectively, the system of equations in (3.4) has a positive solution (f0 , f1 ) where f0 =
1 √ 2
( p−
p − 4r ),
(3.15)
and f1 is given by (3.5). Then the conditions in Theorem 3.1 give the spiral regions in (κ0 , κ1 ) curvature space. Proof. From all the discussion above and equations from (3.4) to (3.14), we conclude that the system of equations in (3.4) can be solved by finding a positive real solution of the third equation in (3.14). By Descartes rule of signs, the cubic equation (3.14)(iii) has at least one positive root which is p=
1 3
(2c2 + η1/3 + λη−1/3 ),
(3.16)
where
η=
1 2
(µ +
µ2 − 4λ3 ),
(3.17)
for λ and µ given in (3.11). That p can be proved positive by considering 4λ3 ≥ µ2 , and therefore by assuming η = keiθ , for k = λ3/2 , θ ∈ [0, π], and by obtaining p =
2
c2 +
3
√ θ λ cos
3
,
> 0.
(3.18)
Since q and r are also positive by (3.13), the first factor of (3.12) has no positive root while the second has exactly two positive roots f0 =
1 √ 2
( p±
p − 4r ),
(3.19)
if κ1 > d/3 and 4λ3 ≥ µ2 . In addition, we have to show that, for f1 to be positive, at least one of the positive f0 must belong to (0, u) by (3.5). Since g (f0 ) =
d2 d3 w 3
κ02 κ1
{(u − 3w) + (f0 − u)} + 4u (f0 − u) 2
+ 4u(f0 − u)3 + (f0 − u)4 , √
therefore f1 , by (3.5), is positive for f0 = ( p ± √ √ u > 3w and for f0 = ( p − p − 4r )/2 if u ≤ 3w . This completes the proof of theorem.
2
√
p − 4r )/2 if
Necessary conditions for cubic spirals can be obtained from the discriminant of g (f0 ) in (3.9) and the fact that the osculating circle at the endpoint p0 is completely inside the osculating circle at the other endpoint p3 . These conditions are discussed in [19,20], and provide lower boundaries of the region in which any spiral segment may be achieved. These boundaries are shown by dark solid hyperbolas in Fig. 2(a)–(b). 3.3. Numerical determination of spiral regions In this section some numerical examples, with given tangent angles are considered for the spiral regions with respect to curvatures at the endpoints as the parameter w increases. These spiral regions are shown in Fig. 2(a)–(d) with the darkest, darker, and dark shades as w increases. We have considered the following cases. Case 1. (φ0 , φ1 ) = (0.7, 1.4): Spiral regions for different values of w are shown in Fig. 2(a). Case 2. (φ0 , φ1 ) = (0.1, 1.5): This is the case when the tangent angle at the start point becomes very small. As a result the
curvature at the start point also becomes very small. Spiral regions for different values of w are shown in Fig. 2(b). Case 3. (φ0 , φ1 ) = (0.8, 0.9): This special case occurs when the tangent angle at the start point is slightly less than the tangent angle at endpoint. As a result the curvature at the start point also becomes slightly less than the curvature at the endpoint. For different values of w , the spiral regions for their values are shown in Fig. 2(c). Case 4. (φ0 , φ1 ) = (0.99, 1): In this case the tangent angle at start point is very near to the tangent angle at the endpoint. As a result the curvature at the start point also gets very near to the curvature at the endpoint. Fig. 2(d) shows the corresponding spiral regions for different values of w . 4. The algorithm Based on the above analysis, we have adopted the approach to construct a G2 Hermite rational cubic Bézier spiral with a single segment. It is described in the following algorithm. 1. Given are the endpoints, and the tangent directions and curvatures at the endpoints. 2. Normalize the endpoints by transformation according to Fig. 1. 3. Find the admissible range of w (≥wmin ) for which the conditions in (3.3) and (3.10) are true, where wmin is given in (3.8). The Newton Raphson method can be used with w = wmin and w = 3 as initial guesses for the admissible lower and upper limits of w , respectively. For a spiral segment, any value of w within its admissible range can be considered. However, to automate the procedure, we have considered the average of its lower and upper limits in our numerical examples. 4. Find f0 and f1 from (3.15) and (3.5), respectively. 5. Find the middle control points p1 and p2 from (2.7). 6. Find the required spiral segment from (2.4). 7. Apply the reverse transformation to bring the transition curve back to its original location. 5. Numerical examples and comparison We consider the following examples of G2 Hermite rational cubic Bézier spiral curves with their corresponding curvature plots and derivative of curvature plots. The data of these examples is in normalized Hermite form. As before, the endpoints are fixed at p0 = (−1, 0) and p3 = (1, 0), the tangent angles and curvatures at endpoints are (φ0 , φ1 ) and (κ0 , κ1 ), respectively. Example 1. For (φ0 , φ1 ) = (0.7, 1.4) and (κ0 , κ1 ) = (0.45, 4.5), we can select any value of w ∈ [0.43, 1.05] for the spiral segment. Fig. 3(a)–(c) gives illustrations of case 1 (Fig. 2(a)). Example 2. For (φ0 , φ1 ) = (0.1, 1.5) and (κ0 , κ1 ) = (0.035, 100), we can select any value of w ∈ [0.92, 2.14] for the spiral segment. Fig. 3(d)–(f) describe the special case 2 (Fig. 2(b)). In this example, the curvature at the start point is very small as compared to the curvature at the endpoint. Example 3. For (φ0 , φ1 ) = (0.99, 1) and (κ0 , κ1 ) = (0.83, 0.85), we can select any value of w ∈ [0.68, 0.72] for the spiral segment. Fig. 3(g)–(i) deal with case 4 (Fig. 2(d)), when the curvatures at the endpoints are almost equal. First we consider a simple case given in Fig. 2(a) for comparison with Figure 9 of [20]. Both examples of this case show the same spiral regions. The difference in the range of curvatures is due to the same as in the scaling of normalized data described by Fig. 1 of this paper and that of [20]. Our algorithm successfully handles the special case when the curvature at the start point is much less than the curvature at
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
(a) (φ0 , φ1 ) = (0.7, 1.4) and w = 0.6 (darkest), 0.8 (darker), 1 (dark).
(c) (φ0 , φ1 ) = (0.8, 0.9) and w = 0.64 (darkest), 0.68 (darker), 0.72 (dark).
1121
(b) (φ0 , φ1 ) = (0.1, 1.5) and w = 0.6 (darkest), 0.8 (darker), 1 (dark).
(d) (φ0 , φ1 ) = (0.99, 1) and w = 0.64 (darkest), 0.68 (darker), 0.72 (dark).
Fig. 2. Spiral regions with respect to curvatures at the endpoints.
the endpoint. Spiral regions with respect to curvatures at the endpoints are shown as shaded regions in Fig. 2(b). A similar case with the same spiral regions is highlighted in Figure 7 of [20]. Another special case when the curvature at the start point is slightly less than the curvature at the endpoint, or when the curvatures at both endpoints are almost equal. Examples of these cases are given in Fig. 2(c) and (d). No example similar to this case is given in [19,20]. As a verification of our claim, spiral curves, their curvature plots, and their derivative of curvature plots are given in Fig. 3. Our scheme gives the spiral curves even for (φ0 , φ1 ) = (0.1, 1.5) used in conjunction with (κ0 , κ1 ) = (0.035, 100), and for (φ0 , φ1 ) = (0.99, 1) used in conjunction with (κ0 , κ1 ) = (0.83, 0.85). Most of the discussion in sections 3, 4, and 5 of [20] is on the procedure of formulating the problem of optimization
of rational cubic spiral, discretization, and stability issues. The possibilities of hidden curvature extrema are minimized but could not be removed due to the analysis on discrete values of t ∈ [0, 1]. Our procedure of derivation of spiral regions and finding the range of a free parameter for the spiral segment is significantly simplified due to the evaluation of the derivative of the curvature for arbitrary values of t ∈ [0, 1]. Spiral conditions are computationally stable and are mathematically proved by Descartes’ rule of sign. Although their expansions are large yet these are not the part of numerical generation of spiral transition curve. Our algorithm generates the range of a single free parameter w . Any real value within the range can be selected for the spiral segment. In [20], the algorithm returned discrete values of two free parameters w0 and f0 .
1122
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
(a) A simple spiral curve with (φ0 , φ1 ) = (0.7, 1.4), (κ0 , κ1 ) = (0.45, 4.5), and w = 0.74.
(c) Derivative of curvature plot.
(b) Curvature plot.
(d) A special spiral curve with (φ0 , φ1 ) = (0.1, 1.5), (κ0 , κ1 ) = (0.035, 100), and w = 1.53.
(e) Curvature plot.
(f) Derivative of curvature plot.
(g) A special spiral curve with (φ0 , φ1 ) = (0.99, 1), (κ0 , κ1 ) = (0.83, 0.85), and w = 0.7.
(h) Curvature plot.
(i) Derivative of curvature plot. Fig. 3. G2 Hermite rational cubic Bézier spiral curves.
6. Conclusion and future directions We derived admissible regions for a G2 Hermite spiral segment by using a single free parameter of a rational cubic Bézier function to overcome the problems highlighted in [20]. Our scheme provides at least the same results as in [20], in a stable manner and without any fear of spiking phenomenon of non-monotone curvature. Use of a single free parameter w in our method rather
than two parameters f0 and w0 as in [20] has a benefit because designers and implementers have fewer entities to deal with. Future research work on the topic discussed above can be continued along various directions. For example, we can explore the possibility of more spiral regions by using any other method of spiral conditions or by considering another suitable form of rational cubic function, like in [1]. Secondly, in a broader perspective this paper just deals with spirals between circles with
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
non-coinciding centers. This work could possibly be extended to include concentric circles in the domain. Finally, all the above mentioned objectives could also be tried with PH (Pythagorean hodograph) spiral functions, introduced in [25,17,18,26], for providing possibilities of wider spiral regions to allow designers a comfortable range of end curvature selections.
1 3
H4 (f0 , f1 ; φ0 , φ1 ) = w a0 {2 − 87w − 27w 3 + f1 (13 + 9w 2 )}
+ a1 [6wb1 (5 − w + 3w 2 ) cos γ + f1 {(14 − 6w2 ) sin φ1 − 3(7 + 45w2 − 6w3 + 18w 4 ) sin θ } + 2w(85 − 3w + 270w 2 − 27w3 + 81w4 ) × cos φ0 sin γ ] − f0 [3b0 (2 + 2w 2 − 3w 3 ) − w b1 × {2(34 − 21w + 18w2 − 27w 3 ) sin φ0 − (2 + 51w − 18w 2 + 27w3 ) sin τ } − wf1 {(41 + 66w + 306w 2 − 54w 3 + 81w4 ) sin γ + 2(37 − 150w + 126w2 − 54w3 + 81w4 ) sin φ0 cos φ1 } × sin γ + 3(5 + 115w2 − 90w 3 + 279w4 − 54w 5 + 81w 6 ) sin2 γ ] − 2w e0 + 2e1 (5 + 6w2 ) − 6w e2 (5 + 3w 2 ),
Acknowledgements The authors owe their gratitude to the editor and three anonymous referees for their valuable comments and suggestions which have helped to improve the presentation of the paper. This work is supported by Kagoshima University, Kagoshima, Japan and FAST National University of Computer & Emerging Sciences, Lahore, Pakistan. Appendix 1 To obtain the expressions in (3.2), in the simplified form, which occur as coefficients in the derivative κ ′ (t ) in (3.1), we first assume that:
12
H5 (f0 , f1 ; φ0 , φ1 ) = −a0 {w(17 + 18w 2 ) − f1 (1 + 6w 2 )}
(a0 , a1 , b0 , b1 ) = (f03 sin2 φ1 , f02 sin φ1 , f13 sin2 φ0 , f12 sin φ0 ), (e0 , e1 , e2 ) = (b0 , f12 sin φ0 cos φ1 sin(φ0 + φ1 ), f1 sin2 (φ0 + φ1 )), (γ , θ, τ ) = (φ0 + φ1 , 2φ0 + φ1 , φ0 + 2φ1 ). We, then, have the following. H0 (f0 , f1 ; φ0 , φ1 ) = a0 (1 + 9w 2 − 3w f1 ) − 2a1 (b1 cos γ − 3w f1 sin θ
+ 9w2 cos φ0 sin γ ), 1 4
1 2
1 4
H1 (f0 , f1 ; φ0 , φ1 ) = 3w a0 (1 + 3w − f1 ) − 2a1
× (3w − f1 ) cos φ0 sin γ + f0 {b0 − 3w b1 (2 × sin φ0 + sin τ ) + 9w 2 f1 (2 sin φ0 cos φ1 + sin γ ) sin γ − 27w 3 sin2 γ },
1 6
+ 3w f1 (sin φ1 − 3w sin θ ) − (1 − 27w 3 ) cos φ0 sin γ } + f0 [9w b0 − b1 {2(4 + 27w2 ) sin φ0 } + (5 + 27w 2 ) sin τ + 3w f1 × {2(8 + 27w2 ) sin φ0 cos φ1 + (10 + 27w2 ) sin γ } sin γ − 9w2 (13 + 27w 2 ) sin2 γ ],
+ a1 [2b1 (4 + 9w 2 ) cos γ + 3w f1 {(5 + 3w) sin φ1 − 2(7 + 9w2 ) sin θ} − 6w(1 − 30w − 27w3 )] × cos φ0 sin γ − 3f0 [{wb0 (1 − 3w) + wb1 {(5 − 6w + 18w2 ) sin φ0 + 3(2 − w + 3w2 ) sin τ } − f1 × {(1 + 36w 2 − 9w 3 + 27w4 ) sin γ + 2(2 + 15w2 − 9w3 + 27w4 ) × sin φ0 cos φ1 } sin γ + 3w(5 + 33w 2 − 9w 3 + 27w 4 ) × sin2 γ }] − e0 + 6we1 − 9w 2 e2 ,
+ a1 [6w2 b1 cos γ + w f1 {(2 − 21w − 9w 2 ) sin φ1 − (14 − 6w + 27w2 ) × sin θ } + 2(5 + 57w 2 − 18w 3 + 54w4 ) cos φ0 sin γ ] + f0 [5wb0 − b1 × {3(3 + 14w 2 − 3w 3 ) sin φ0 − (2 + 9w3 ) sin τ } − w f1 {(28 + 27w + 45w2 + 54w3 ) sin γ − 2(34 − 18w + 61w2 − 27w3 ) sin φ0 cos φ1 } × sin γ + 3w(8 − 19w + 63w 2 − 36w 3 + 54w4 ) sin2 γ ] + 5w e0 + 2w e1 (7 − 15w) − 3e2 × (1 + 14w − 15w2 ),
H6 (f0 , f1 ; φ0 , φ1 ) = −a0 {3(3 + 11w 2 ) − w f1 (5 + 9w)}
H2 (f0 , f1 ; φ0 , φ1 ) = 5a0 (6w − f1 ) + 6a1 {3w b1 cos γ
H3 (f0 , f1 ; φ0 , φ1 ) = 3a0 {2 − 9w 3 − w f1 (1 − 3w)}
1123
− 2w a1 [f1 {(26 + 3w + 27w 2 ) × sin φ1 − (5 − 12w) sin θ} − (32 − 33w + 99w2 ) cos φ0 sin γ ] − f0 [w b0 (5 + 9w) − 2w b1 × {(26 + 3w + 27w 2 ) sin φ0 − (5 − 12w) sin τ } + f1 (19 + 192w2 − 54w 3 + 81w4 ) sin(φ0 − φ1 ) sin γ − 3w(14 − 37w + 66w 2 − 99w 3 ) × sin2 γ ] + 3e0 (3 + 11w 2 ) − 2w e1 (32 − 33w + 99w 2 ) − 3w e2 (14 − 37w + 66w 2 − 99w3 ).
References [1] Habib Z, Sarfraz M, Sakai M. Rational cubic spline interpolation with shape control. Computers & Graphics 2005;29(4):594–605. http://dx.doi.org/10.1016/j.cag.2005.05.010. [2] Sarfraz M. Curve fitting for large data using rational cubic splines. International Journal of Computers and Their Applications 2003;10(4):233–46. http://dblp.uni-trier.de/rec/bibtex/journals/isca/Sarfraz03. [3] Sarfraz M, editor. Geometric modeling: techniques, applications, systems and tools. Netherlands: Kluwer; 2004. [4] Steven ML. Planning algorithms. Cambridge University Press; 2006. [5] Held M, Spielberger C. A smooth spiral tool path for high speed machining of 2d pockets. Computer-Aided Design 2009;41(7):539–50. http://dx.doi.org/10.1016/j.cad.2009.04.002. [6] Liang T, Liu J, Hung G, Chang Y. Practical and flexible path planning for car-like mobile robot using maximal-curvature cubic spiral. Robotics and Autonomous Systems 2005;52(4):312–35. [7] Farin G. Curves and surfaces for CAGD: a practical guide. 5th ed. Morgan–Kaufmann; 2002.
1124
Z. Habib, M. Sakai / Computer-Aided Design 42 (2010) 1117–1124
[8] Hoschek J, Lasser D. Fundamentals of computer aided geometric design [Schumaker L.L, Trans.]. Wellesley (MA): A. K. Peters; 1993. [9] Li Z, Meek D, Walton D. A smooth, obstacle-avoiding curve. Computers & Graphics 2006;30(4):581–7. [10] Sakai M. Inflection points and singularities on planar rational cubic curve segments. Computer Aided Geometric Design 1999;16(3):149–56. [11] Walton DJ, Meek DS. Curvature extrema of planar parametric polynomial cubic curves. Journal of Computational Applied Mathematics 2001;134(1–2): 69–83. [12] Farin G. NURB curves and surfaces. 2nd ed. A K Peters; 1999. [13] Sakai M. Osculatory interpolation. Computer Aided Geometric Design 2001; 18(8):739–50. [14] Farin G. Geometric Hermite interpolation with circular precision. ComputerAided Design 2008;40(4):476–9. [15] Guggenheimer H. Differential geometry. New York: McGraw-Hill; 1963. [16] Sarpono D, Habib Z, Sakai M. Fair cubic transition between two circles with one circle inside or tangent to the other. Numerical Algorithms 2009;51(4): 461–76. http://dx.doi.org/10.1007/s11075-008-9252-1. [17] Habib Z, Sakai M. On PH quintic spirals joining two circles with one circle inside the other. Computer-Aided Design 2007;39(2):125–32. http://dx.doi.org/10.1016/j.cad.2006.10.006.
[18] Habib Z, Sakai M. Transition between concentric or tangent circles with a single segment of G2 PH quintic curve. Computer Aided Geometric Design 2008; 25(4–5):247–57. http://dx.doi.org/10.1016/j.cagd.2007.10.006. [19] Dietz DA, Piper B. Interpolation with cubic spirals. Computer Aided Geometric Design 2004;21(2):165–80. [20] Dietz DA, Piper B, Sebe E. Rational cubic spirals. Computer-Aided Design 2008; 40:3–12. [21] Boehm W, Prautzsch H. Geometric concepts for geometric design. USA: A K Peters; 1994. [22] Rowin M. Conic, cubic, and T-conic segments. Technical report document D2–23252. The Boeing Co.; 1964. [23] Forrest A. Curves and surfaces for computer-aided design. Ph.D. thesis. Cambridge University; 1968. [24] Henrici P. Applied and computational complex analysis, vol. 1. New York: Wiley; 1988. [25] Habib Z, Sakai M. G2 Pythagorean hodograph quintic transition between two circles with shape control. Computer Aided Geometric Design 2007;24(5): 252–66. http://dx.doi.org/10.1016/j.cagd.2007.03.004. [26] Walton DJ, Meek DS. G2 curve design with a pair of Pythagorean hodograph quintic spiral segments. Computer Aided Geometric Design 2007;24(5): 267–85.