Computer Aided Geometric Design 23 (2006) 243–260 www.elsevier.com/locate/cagd
Normal based subdivision scheme for curve design Xunnian Yang Department of Mathematics, Zhejiang University, Yuquan, Hangzhou 310027, People’s Republic of China Received 7 November 2004; received in revised form 22 June 2005; accepted 21 October 2005 Available online 28 November 2005
Abstract In this paper we propose a new kind of nonlinear and geometry driven subdivision scheme for curve interpolation. Instead of using linear combination of old vertexes, displacement vector for every new vertex is given by normal vectors at old vertexes. The normal vectors are computed adaptively for each time of subdivision, and the limit curve is G1 smooth with wide ranges of free parameters. With this new scheme, normal vectors at selected vertexes can be interpolated efficiently. A shape preserving subdivision scheme with explicit choices of all free parameters is also presented. 2005 Elsevier B.V. All rights reserved. Keywords: Curve interpolation; Normal based subdivision; Nonlinear subdivision; Shape preserving
1. Introduction Curve interpolation by repeated subdivision is an efficient shape design method in the field of computer aided geometric design and many curve subdivision schemes serve as the foundations for surface subdivision. For interpolating curve subdivision, new vertexes will be computed and added to the old polygons for each time of subdivision and the limit curve will pass through all the vertexes of the original control polygon. In this paper we present a new scheme for curve interpolation by subdivision. A well known work for interpolatory subdivision scheme is four point subdivision scheme proposed by Dyn et al. (1987). Four point subdivision scheme is a stationary linear subdivision scheme and polynomials of order up to three can be reproduced by this scheme. Recently, several new schemes are proposed as the extensions of four point subdivision scheme (Hassan et al., 2002; Marinov et al., 2004). To obtain a fair subdivision curve, Kobbelt (1996) proposed a non-stationary subdivision scheme for curve interpolation. Aspert et al. (2003) proposed a nonlinear interpolatory subdivision scheme based on spherical coordinates transformation. Besides interpolating the original control vertexes, derivatives at the initial data can also be set ahead and interpolated using Hermite subdivision schemes (Jüttler and Schwanecke, 2002). Besides convergence and continuity, another important property for geometric design by subdivision is shape preserving property. Because shape preservation is often dealt as a nonlinear and geometric problem, several shape preserving subdivision schemes were only concerned with univariate functional data or convex polygonal curve in the literature. LeMéhauté and Utreras (1994) proposed a convexity preserving subdivision scheme that generates C 1 E-mail address:
[email protected] (X. Yang). 0167-8396/$ – see front matter 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.cagd.2005.10.001
244
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
smooth curves interpolating functional data. When applied for univariate data, four point subdivision scheme can also be used for convexity preserving purpose (Kuijt and van Damme, 1998; Dyn et al., 1999). For general convex data, a geometric subdivision scheme was proposed by Dyn et al. (1992). In this paper we present a new nonlinear and geometric dependent subdivision scheme for curve interpolation. With the observation that every intermediate polygon is a piecewise linear approximation to a final interpolating curve, and then every new added vertex can be estimated from the intermediate polygon geometrically. From a geometric point of view, a new vertex can be obtained by adding a displacement vector from a selected point on the old polygon. When we choose a point on an edge we just split the edge into two sub-edges. Then the displacement vector from the split point can be computed as a combination of the projection of the sub-edges on the normals at the end points of the old edge. It can be shown that the limit curve is G1 smooth with adaptive computation of normal vectors for each intermediate polygon. Moreover, we can easily obtain shape preserving subdivision scheme with explicit choices of the subdivision parameters, and some other properties such as normal interpolation at selected points, straight line or circular arc generation can be easily achieved too. The organization of the paper is as follows. In Section 2 we will introduce general idea of normal based subdivision scheme, and we present the smoothness analysis of this scheme in Section 3. In Section 4 we will present a shape preserving subdivision scheme. The experimental examples are presented in Section 5. Section 6 is devoted to the conclusion of the paper. 2. The subdivision scheme Let {pi0 }i be a sequence of control points, we define the normal based subdivision scheme as k+1 p2i = pik , k k+1 = 1 − sik pi−1 + sik pik + vik , p2i−1
(1) (2)
where 0 < εa sik 1 − εb < 1 be the subdivision parameter and vik be the displacement vector corresponding to the k pk . edge pi−1 i Before defining the displacement vector vik we define the unit normal at each vertex firstly. Except for fixed normals at selected vertexes, normal vectors at other vertexes will be computed adaptively after each time of subdivision. Let k , p k and p k k k pi−1 i i+1 be three consecutive vertexes with different positions, we define the normal vector ni at pi as k p k p k . Let T k be the unit tangent vector at p k , we have paralleling the bisector of the angle pi−1 i i+1 i i Tik =
Ti− + Ti+
Ti− + Ti+
where Ti− =
k pik −pi−1
k pik −pi−1 computed as nki
,
and Ti+ =
k −p k pi+1 i
. Assume that Tik = (Tik .x, Tik .y), then the unit normal vector nki at pik
k −p k pi+1 i (−Tik .y, Tik .x). For
can be = fixed normals, they can be either computed from the initial control polygon or given ahead by users, but they will be kept unchanged during the subdivision. With the normals at all vertexes defined, local shapes corresponding to individual edges will be determined efficiently by the vertex positions as well as the normals. As in the following definition, we can classify all edges into three types, convex edges, inflection edges and straight edges (see Fig. 1).
Fig. 1. (a) Convex edge; (b) inflection edge; (c) straight edge.
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
245
Fig. 2. Compute a new vertex by adding a displacement vector. k p k be an arbitrary edge with normal vectors nk k k k Definition. Let pi−1 i i−1 and ni at pi−1 and pi , respectively, the projeck k k k k )nk . tions of the edge onto the normals at the end points are computed as li = (pi−1 − pi )ni−1 and rik = (pik − pi−1 i k p k a convex edge if l k r k > 0. The edge will be defined an inflection edge when l k r k < 0 or We define the edge pi−1 i i i i i k p k is defined a straight edge. one of these two projections vanishes. If both lik and rik vanish, the edge pi−1 i k p k (see Fig. 2). Let α k and β k be the unsigned angles Now, we define the displacement vector for an edge pi−1 i i i k p k with the tangent line T k at p k k at p k , respectively, we have or with the tangent line T between the chord pi−1 i i i i−1 i−1 k + s k p k , the displacement vector for a convex edge can be defined 0 αik < π2 and 0 βik < π2 . Let pm = (1 − sik )pi−1 i i as (3) vik = w λki nki−1 + µki nki , k − p )nk k k k k k where λki = (pi−1 m i−1 and µi = (pi − pm )ni . The tension parameter w here is a positive number. If pi−1 pi 1 k is an inflection edge or a straight edge, we choose si = 2 and the displacement vector is defined as w(λki nki−1 + µki nki ), if αik + βik π2 , k vi = (4) w(2σik eik − λki nki−1 − µki nki ), otherwise,
where eik =
k pik −pi−1
and σik = (λki nki−1 + µki nki )eik . The definition of vik under αik + βik >
k pik −pi−1 k k k k w(λi ni−1 + µi ni ) with
π 2
is a symmetric vector of
k pk . pi−1 i
respect to the edge In the following text we will show that limit curves by this subdivision scheme exist and are tangent smooth within wide ranges of free parameters. Moreover, the scheme can be modified for shape preserving curve interpolation just by choosing some proper subdivision parameters. 3. Smoothness analysis With the definition of chord tangent angles, the absolute values of λki and µki can be obtained as k λ = s k p k − p k sin α k , i i i i i−1 k µ = 1 − s k p k − p k sin β k . i
i
i
i−1
i
(5) (6)
From Eqs. (5) and (6) we have sin αik = sin βik =
|λki | k − pk sik pi−1 i
,
|µki | . k k (1 − si )pik − pi−1
k p k is a convex edge we can assume that the normal nk k If pi−1 i i−1 and ni are both pointing toward the convex side of the polygon, then we have λki > 0 and µki > 0. It can be easily verified that the displacement vector vik lies at
246
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
Fig. 3. Displacement vector for an inflection edge. k p k too. For a straight edge it is clear that the displacement vector vanishes and a the convex side of the edge pi−1 i new added vertex lies on the edge itself. As to the problem of which side will the displacement vector vik lie for an inflection edge, we have the following theorem. k p k be an inflection edge, the chord tangent angles at p k k k k Theorem 1. Let pi−1 i i−1 and pi are αi and βi , respectively, k then the displacement vector vi as defined in Eq. (4) lies on the side with larger chord tangent angle.
Proof. It is clear that the theorem holds when αik = 0 or βik = 0. We then need to prove the theorem under the condition that αik > 0 and βik > 0. Without loss of generality, we can assume that the normal nki−1 is pointing toward k (see Fig. 3), then we have λki > 0 and µki < 0. To judge which side does the convex side of the polygon at vertex pi−1 k p k , we should then determine the sign of the projection of v k onto the displacement vector vik lie to the edge pi−1 i i the normal vector of the edge. By deleting a positive coefficient, the perpendicular part of the vector vik to the edge k p k is λk cos α k + µk cos β k when α k + β k < π or −λk cos α k − µk cos β k when α k + β k > π . By substituting pi−1 i i i i i i i i i i i i i 2 2 Eqs. (5) and (6), we have 1 k 1 k sin βik cos βik λki cos αik + µki cos βik = pi−1 − pik sin αik cos αik − pik − pi−1 2 2 1 k sin 2αik − sin 2βik = pik − pi−1 4 k 1 k sin αi − βik cos αik + βik . = pik − pi−1 2 From the above equality we can see that the sign of λki cos αik + µki cos βik is same as the sign of αik − βik when αik + βik < π2 . If αik + βik > π2 , the sign of −λki cos αik − µki cos βik agrees with the sign of αik − βik too. The displacement k p k lies at the side with the angle α k when α k > β k and lies at the side with β k vector vik for an inflection edge pi−1 i i i i i otherwise. The theorem is proven. 2 Before discussing the convergence and smoothness of normal based subdivision scheme, we give a few formulae about trigonometric functions and the bounds of the subdivision parameters. These formulae can be easily verified and we leave the proof to interested readers. (a) Let 0 < θ < θk π2 , then sin θk θ sin θ θ. θk
(7)
(b) Assume that 0 < φ1 , φ2 < π2 , if sin φ1 < r sin φ2 with r 1, then we have φ1 < rφ2 .
(8)
(c) With the assumption that 0 < εa sik 1 − εb < 1, we have 1 − sik sik
εb sa , 1 − εb
sik 1 − sik
εa sa , 1 − εa
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
247
εa where sa = min{1, 1−ε , εb }. With this definition we have 0 < sa 1. a 1−εb The normal based subdivision scheme permits subdivision parameter sik for each edge and tension parameter w for all displacement vectors. Let ws = min{2εa (1 − εa ), 2εb (1 − εb )}, it can be verified that ws 0.5, and 2sik (1 − sik ) > ws when εa < sik < 1 − εb . Let θk = maxi {αik , βik }, we have the following theorem.
Theorem 2. For the normal based subdivision scheme defined by Eqs. (1)–(4), if we choose sik and w satisfying εa < sik < 1 − εb and 0 < w < ws cos π4 , then we have limk→∞ θk = 0. Proof. The essence of the proof of this theorem is the estimation of new chord tangent angles after each subdivision. The proof is consisting of three main steps, chord tangent angles estimation at new inserted vertexes, chord tangent angles estimation at old vertexes, convergence analysis of the angles. (1) Chord tangent angles at new inserted vertexes k+1 k p k (see Fig. 2), we estimate new chord Let p2i−1 be the new inserted vertex corresponding to the edge pi−1 i k+1 k+1 k+1 k+1 k+1 k k+1 k+1 k and α2i at p2i−1 . Let β¯2i−1 = p2i−1 pi−1 pm and α¯ 2i = p2i−1 pi pm , and denote the angle tangent angles β2i−1 k+1 pk p p as γ , we have 2i−1 i−1 2i−1 m k+1 sin β¯2i−1 = sin γ2i−1
vik k pm − pi−1
w sin αik +
1 − sik sik
wλki nki−1 + µki nki k pm − pi−1
w sin βik
w w max sin αik , sin βik k sin θk . k si si
k+1 pm as γ2i and we have In the same way we can define pik p2i−1 k+1 = sin γ2i sin α¯ 2i
vik pm − pik
w 1 − sik
max sin αik , sin βik
w 1 − sik
sin θk .
k+1 k p k lies between p k k onto the edge pi−1 With simple calculation, we can see that the projection of p2i−1 i i−1 and pi , k+1 k+1 k+1 k+1 π π then we have 0 < β¯2i−1 < 2 and 0 < α¯ 2i < 2 . Moreover, we can derive upper bounds for β¯2i−1 and α¯ 2i in terms k+1 < π2 , we have of θk explicitly. Because 0 < β¯2i−1 k+1 sin β¯2i−1 = 2m sin
k+1 β¯2i−1
2m
cos
k+1 β¯2i−1
2
· · · cos
k+1 β¯2i−1
2m
> 2m sin
k+1 β¯2i−1
2m
cosm
β¯ k+1 m π = 2 2 sin 2i−1 . 4 2m
Then we have β¯ k+1 w 1 < k m/2 sin θk . sin 2i−1 2m si 2 So, with proper choice of m, we have k+1 β¯2i−1
0 k p k is a convex edge and the length of the subvector of v k perpendicular to edge p k p k In this case, the edge pi−1 i i i−1 i is w|λki cos αik + µki cos βik |. Then, we have vik k pi−1
− pm
wλki nki−1 + µki nki
w|λki cos αik + µki cos βik | k k − pi−1 sik pik − pi−1 |µki | cos βik |λki | cos αik , w max k k k s k p k − p k si pi − pi−1 i i i−1 k 1 − s i k k sin β cos β = w max sin αik cos αik , i i sik 1 − sik cos θk max sin αik , sin βik w min 1, k si 1 − sik sin θk w min 1, cos θk max αik , βik . k θk si
=
When the lower bound of
sik pik
vik k pi−1 −pm
is obtained, we have
k+1 k+1 k+1 α¯ 2i−1 = αik − β¯2i−1 αik − sin β¯2i−1 = αik − sin γ2i−1
vik
k −p pi−1 m
k 1 − si sin θk max αik , βik . min 1, 1 − w sin γ2i−1 cos θk k θk si
k+1 k+1 In a similar method we can obtain the upper bound of β¯2i by estimating the lower bound of the angle α¯ 2i .
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
249
vik
k+1 k+1 β¯2i = βik − α¯ 2i βik − sin γ2i
pik − pm sk sin θk max αik , βik . min 1, i k 1 − w sin γ2i cos θk θk 1 − si
k+1 Let ρk = mini {sin γ2i−1 , sin γ2i } cos θk sinθkθk , and it is clear that 0 < ρk 1. Then, the upper bounds for α¯ 2i−1 and
k+1 β¯2i can be reformulated as
k+1 α¯ 2i−1 (1 − wρk sa ) max αik , βik
and
k+1 β¯2i (1 − wρk sa ) max αik , βik .
(2.2) λki µki 0 k+1 k at pi−1 According to the subdivision rule, we choose sik = 12 in this case. We compute here the bound for α¯ 2i−1 k+1 under the condition of λki µki < 0. The bound for β¯2i at pik and the bounds under λki µki = 0 will be obtained similarly. k+1 k p k is an inflection edge and we will compute the bound for α ¯ 2i−1 according to αik > βik or If λki µki < 0, the edge pi−1 i k k αi < βi , respectively. Firstly, when the conditions λki µki < 0 and αik > βik hold, we have k+1 = sin γ2i−1 1 sin β¯2i−1
vik
k 2 pi
k − pi−1
wλki nki−1 + µki nki 1 k 2 pi
k − pi−1
w sin αik + sin βik 2w sin αik .
k+1 Since 0 < w 0.5 always holds during the subdivision, we have 0 < β¯2i−1 αik . From this inequality we obtain the k+1 bound for α¯ 2i−1 as k+1 k+1 0 < α¯ 2i−1 = αik − β¯2i−1 < αik .
Secondly, when the conditions λki µki < 0 and αik < βik hold, the displacement vector vik lies on the side with the k+1 pm pik angle βik . Moreover, the sign of λki sin αik + µki sin βik is the same as that of µki which means that the angle p2i−1 k p k as p p , and denote is an acute angle (see Fig. 4). We denote the subvector of vik perpendicular to the edge pi−1 m v i k+1 k pm p ¯ p = η. It is clear that β < η. As for η we have 2i−1 i−1 v tan η =
w|λki cos αik + µki cos βik |
1 k k 2 pi − pi−1 = w sin βik − αik cos βik
= w sin αik cos αik − sin βik cos βik
+ αik w βik − αik .
k+1 k+1 Since η < tan η, we have α¯ 2i−1 = αik + β¯2i−1 < βik . k k k k So, whether αi > βi or αi < βi holds, we all have k+1 α¯ 2i−1 max αik , βik .
Fig. 4. Chord tangent angle at an inflection edge.
250
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
k+1 k+1 k p k . It is clear that the above bound for α Similarly, we have β¯2i max{αik , βik } for the inflection edge pi−1 ¯ 2i−1 and i k+1 k k ¯ β2i also holds when λi or µi vanishes. (2.3) The bound of new chord tangent angles k p k and p k p k If pi−1 i i i+1 are two inflection edges with one common inflexion after some subdivision, it can be easily k+1 k+1 k+1 k+1 , pik and p2i+1 are on a line. Then both β2i and α2i+1 are zero. verified that vertexes p2i−1 k p k and p k p k are among the following three cases, Assume that pik is not an inflexion, two abutting edges pi−1 i i i+1 k p k and p k p k convex and convex, convex and inflection, or convex and straight. If pi−1 i i i+1 are two convex edges we have 1 k+1 k+1 k+1 k+1 k k (1 − wρk sa ) max αik , βik , αi+1 (1 − wρk sa )θk . = α2i+1 = β¯2i + α¯ 2i+1 , βi+1 β2i 2 If one of these two edges is a convex edge and the other one is an inflection edge, we have
1 1 k+1 k+1 k+1 k+1 ¯ β2i = α2i+1 = β2i + α¯ 2i+1 1 − wρk sa θk . 2 2 k+1 k+1 k+1 k+1 k p k or p k p k If pi−1 ¯ 2i+1 (1 − wρk sa )θk or β2i = β¯2i (1 − wρk sa )θk . i i i+1 is a straight edge, we have α2i+1 = α (3) Convergence of chord tangent angles By summarizing steps (1) and (2), we can conclude that for arbitrary i, αik+1 < rk θk and βik+1 < rk θk , where rk = max{rk1 , 1 − 12 wρk sa }. Then, we have
θk+1 < rk θk . When we choose 0 < w < ws cos π4 , we have rk1 < 1. Consequently, we have rk < 1 and θk+1 < θk . Since the sequence θk (k = 0, 1, . . .) is decreasing, we can conclude that cos θk sinθkθk > cos θ0 sinθ0θ0 for k > 0. To find the lower bound of ρk , we should also compute a lower bound for sin γ2i−1 or sin γ2i in advance. From the geometry of local displacement vector we have vik
k+1 sin β¯2i−1 = sin γ2i−1
= sin γ2i−1
wλki nki−1 + µki nki
k k pm − pi−1 pm − pi−1
1 − sik w sin γ2i−1 w sin αik + w sin βik sin γ2i−1 k sin θk . k si si
k+1 As illustrated in step (1), sin β¯2i−1 > 2 2 sin m
sin
k+1 β¯2i−1
2m
< sin γ2i−1
k+1 β¯2i−1 2m ,
then we have
w sin θk m . sik 2 2
w sin θk ¯ k+1 m < 1 for 0 < w < ws . From Eq. (8) we have β 2i−1 sik 2 2 k+1 k+1 π π k k m 2 γ2i−1 . On another hand (see Fig. 2), β¯2i−1 + γ2i−1 = p2i−1 pm pi > 2 − βi > 2 − θk . Then we have γ2i−1 1 π 1 π 1 π 2m +1 ( 2 − θk ) > 2m +1 ( 2 − θ0 ). In a similar way we have γ2i > 2m +1 ( 2 − θ0 ). Now, we obtain one lower bound ρk (k = 0, 1, . . .) as π − θ0 sin θ0 . ρk ρ = cos θ0 sin 2m 2 + 1 θ0
Assume that m is a properly selected number such that
With lower bound of ρk , we have upper bound of rk as w 1 , 1 − rk r = max wρs a . ws cos π4 2 Because r < 1, then we have lim θk = 0.
k→∞
< > of
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
251
To investigate the limit of rk , we compute the limit of rk1 and ρk , respectively. Based on limk→∞ θk = 0, we k+1 − ϕik , where ϕik = π2 − have limk→∞ rk1 = wws . To compute the limit of ρk , we first reformulate γ2i−1 = π2 − β¯2i−1 p k+1 pm p k . It is clear that −α k < ϕ k < β k , and then limk→∞ ϕ k = 0. On another hand, sin β¯ k+1 w sin θk which k 2i−1
i
implies that have
i
k+1 limk→∞ β¯2i−1
i
i
i
= 0. With these two limits, we have limk→∞ γ2i−1 =
2i−1
π 2
si
and limk→∞ ρk = 1. Now, we
w 1 lim rk = max , 1 − wsa . k→∞ ws 2
The theorem is proven.
2
It should be pointed out that the proof of Theorem 2 is conservative. In fact, we can choose w < ws such that limk→∞ rk < 1 for subdivision curve generation. For the purpose of clarity, we assume that θk+1 < rθk with r < 1 in the following text. Theorem 3. If εa < sik < 1 − εb and 0 < w < ws cos π4 , then the normal based subdivision scheme defined by Eqs. (1)–(4) converges and the limit curve is G1 smooth. Proof. To prove this theorem we address three main points: (a) any polygon sequence generated by normal based subdivision converges to a continuous limit curve; (b) tangent at each point on the limit curve exists; (c) the tangent line for the limit curve is continuous. k+1 Let Γk be the polygon after kth subdivision, we compute the distance dk between Γk+1 and Γk . Let p2i−1 be a new k k added vertex corresponding to edge pi−1 pi , then we have k p p k+1 p k pm + v k = p k pm + w λk nk + µk nk i i i−1 i i i−1 2i−1 i−1 i−1
k k k + w pik − pi−1 si sin αik + 1 − sik sin βik sik pik − pi−1 k k si + w sin θk . pik − pi−1 From Theorem 2, we have limk→∞ θk = 0, then the coefficient sik + w sin θk will be less than 1 after finite times of k = 0. Consequently, we have p k − p k L, subdivision. Because εa < sik < 1 − εb , we have limk→∞ pik − pi−1 i i−1 k+1 k p k can be computed as where L is a positive constant. Now, the distance from p2i−1 to the edge pi−1 i dik = w λki cos αik + µki cos βik k k w pik − pi−1 si sin αik cos αik + 1 − sik sin βik cos βik 1 k sin αik + βik Lθk . w pik − pi−1 2 Let dk = maxi dik , we have dk Lθk r k Lθ0 . This means that the polygon sequence {Γk } is a Cauchy sequence and this sequence of polygons converge uniformly. Since each polygon is a piecewise linear curve, the limit curve is continuous. Because all pik s are densely lying on the limit curve, we should just prove that the tangent at each pik exists. To prove the existence of tangent line at pik , we will prove that for any points approaching pik on the limit curve, the lines connecting these points to pik converge. Without loss of generality, we prove that the line connecting pik and any point on the right side of pik converges, and the left case can be proved in a similar way. Moreover, it can be easily verified that if two sets of lines connecting points on either side of pik converge, they will converge to a same limit line. As to the convergence problem on the right side, we address it in two steps: firstly, we will show that a sequence of selected k lines pik p2k+l l i+1 (l 0) converge; secondly, we will prove that any line connecting pi to other point on the limit curve converges to the same limit line.
252
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
k+1 k+l+1 Notice that pik = p2i = p2k+2 2 i = · · ·, it can be easily verified that p2l+1 i+1 is a new vertex added corresponding to ¯ k+1 k+1 k k edge pik p2k+l l +1 . Recalling proof of Theorem 2, the angle β2i+1 = p2i+1 pi pi+1 satisfies
w 2 k+1 k+1 β¯ < sin β¯2i+1 < k sin θk , π 2i+1 si+1 k+1 k+l+1 k k+l < cθk , where c = π2 min{εwa ,εb } . In the same way, let β¯2k+l+1 then we have β¯2i+1 l+1 i+1 = p2l+1 i+1 pi p2l i+1 , then we have k+l+1 k+l β¯2l+1 i+1 < cθk+l < cθk r l (l = 0, 1, . . .). So lines pik p2l +1 (l = 0, 1, . . .) form a Cauchy sequence and the limit line exists when l goes to infinity. Assume T¯ik be the limit line of the sequence, we then prove that any line connecting pik and a point between p k+l+1 and p k+l approaches T¯ k too when l goes to infinity. Assume p ∞ be an arbitrary point l l+1 2
i+1
2 i+1
i
k,l
k+l lying between p2k+l+1 l+1 i+1 and p2l i+1 on the limit curve, it may be reached or approximated with arbitrary closeness by
∞ p k p k+l , then we have repeated subdivision. Let ψk,l = pk,l i 2l i+1
k+l+2 k+l+1 k+l k k+l ¯ k+l+1 ¯ k+l+2 ψk,l p2k+l+1 l+1 i+1 pi p2l i+1 + p2l+2 i+3 p2l+1 i+1 p2l i+1 + · · · = β2l+1 i+1 + β2l+2 i+1 + · · ·
< cθk (r l + r l+1 + · · ·) =
cθk l r. 1−r
∞ approaches T¯ k too, and T¯ k is just the Consequently, we have liml→∞ ψk,l = 0. This implies that the line pik pk,l i i k tangent line at pi on the limit curve. k , we have Let φik be the chord tangent angle between T¯ik and pik pi+1 k+1 k k k+l+1 k k+l k k+1 φik p2i+1 pi pi+1 + p2k+2 2 i+1 pi p2i+1 + · · · + p2l+1 i+1 pi p2l i+1 + · · · k+1 l ¯ k+l+1 + β¯2k+2 = β¯2i+1 2 i+1 + · · · + β2l+1 i+1 + · · · < cθk (1 + r + · · · + r + · · ·) =
cθk . 1−r
c k at p k k k ¯k Similarly, the angle between the tangent T¯i+1 i+1 with pi pi+1 is bounded by 1−r θk too. Assume that Ti also k − T¯ k < 2c θ . Let T¯ ∞ be the unit tangent vector at p ∞ denotes the unit tangent direction at pik , then we have T¯i+1 k,l k,l i 1−r k k+l+1 k+l ∞ by repeated which is lying between p2l+1 i+1 and p2l i+1 on the limit curve, we compute the bound for T¯ik − T¯k,l subdivision again. Then we have k k+l+1 T¯ − T¯ ∞ T¯ k − T¯ k+l+1 + T¯ l+1 − T¯2k+l+2 l+2 i+3 + · · · k,l i i 2l+1 i+1 2 i+1
βi 0 or k k k k k k within the angle between the edge pi pi−1 and the tangent line Ti at pi for 0 αi < βi (see Fig. 3). k+1 k+1 k p k is a convex edge and none of p k k Assume that pi−1 i i−1 or pi is inflexion, then new added vertexes p2i−3 , p2i−1 k p k , p k p k all lie at one side to the tangent line T k at p k . Vertexes p k+1 , p k+1 and chords and chords pi−2 2i−1 2i+1 i−1 i−1 i i−1 i−1 k+1 k+1 k+1 k+1 k+1 k pk , pk pk k k pi−1 i i i+1 lie at one side to the tangent line Ti at pi too. Then, the local polygon p2i−3 p2i−2 p2i−1 p2i p2i+1 k+1 k+1 k+1 is convex. After the definition or redefinition of normal vectors at p2i−2 , p2i−1 and p2i , respectively, the new edges k+1 k+1 k+1 k+1 k k p2i−2 p2i−1 and p2i−1 p2i are two convex edges. Similarly, if pi−1 pi is an inflection edge with αik = βik , then it will be replaced by one convex edge and one new inflection edge after a subdivision. k p k is an inflection edge with α k equal to β k , we have p k+1 = 1 (p k k If pi−1 i i i 2i−1 2 i−1 + pi ) and then the edge will be k , pk replaced by two inflection edges with one common inflexion after a subdivision. In this case, the vertexes pi−1 i k+1 and p2i−1 are on a line and the polygon is local symmetric with respect to the vertex pik . With simple calculation, we can see that the inflexion will be preserved during the subdivision. From the above analysis, the number of inflexions implied by the original control polygon does not increase after each time of subdivision. The theorem is proven. 2
Though shape preserving subdivision curves can be generated by choosing adaptive subdivision parameters for all edges, due to the fixed tension parameter w for every subdivision step, the curves are sometimes not fair. To obtain a shape preserving as well as fair subdivision curve, we should determine the tension parameter for every edge adaptively. For practical computation, we scale the displacement vectors for convex edges adaptively, and the displacement vectors for inflection edges or straight edges are still defined as in Eq. (4). Let vik be the displacement vector defined by Eq. (3) for a convex edge, we compute the scaling factor for the displacement vector according to the criterion that local circular arc will be reproduced provided that the end vertexes k p k , we define and normals at the ends of the edge are sampled from an arc. For a given edge pi−1 i |λki | 1 convex edge, k k , t = 1+cos αi vi
λ
and
tµ =
1,
otherwise,
|µki | 1 , k 1+cos βi vik
convex edge,
1,
otherwise.
Now, we choose the scaling factor for the displacement vector vik as t = min{tλ , tµ } and the new vertex corresponding k p k can be defined to the edge pi−1 i k k+1 = 1 − sik pi−1 + sik pik + tvik . p2i−1
(10)
X. Yang / Computer Aided Geometric Design 23 (2006) 243–260
255
k p k is a convex edge, we have From the definition of tλ and tµ , if pi−1 i
|λki |
t tλ