[ieee 2009 11th ieee international conference on computer-aided design and computer graphics...

4
Blending Circular Quadrics with Parametric Patches Mei-e Fang School of Computer Science Hangzhou Dianzi University Hangzhou, China [email protected] Guozhao Wang Department of Mathematics Zhejiang University Hangzhou, China [email protected] Weiyin Ma Department of MEEM City University of Hong Kong Hong Kong, China [email protected] Abstract A method of blending circular quadrics with parametric patches is proposed in this paper. It needs n rational bicubic B´ ezier patches and two S-patches to blend n (n> 2) quadrics. The blend is G 1 continuous. Explicit formulae of control points of both B´ ezier patches and S-patches are derived from the corresponding G 1 -continuity conditions. In addition, the shape can be intuitively modified by adjusting the free parameters of the blending surfaces. 1. Introduction Surface blending is an important topic in geometric modelling. Simple and classical quadrics are also popularly used in engineering applications. The blending problem of quadrics thus deserves further research. For 2-way blending of circular quadrics, many methods were proposed. In those methods, many different blending surfaces are adopted, including parametric surfaces, implicit surfaces and subdivi- sion surfaces etc. For n-way blending of circular quadrics, one may also find a few existing methods([1-6]).Some subdivision methods designed for general parametric base surfaces can be used to blend quadrics. But we know that a suitable initial frame of subdivision surface is often difficult to construct for blending problem. Additionally, subdivision methods can only obtain an approximate surface result. Wu and Zhou([3]) blended several quadrics with an algebraic surface. They transformed blending into solving a linear system. But such an algebraic surface exists only when all blending boundaries lie on a certain quadric. Chen et al.([4]) proposed to blend several quadrics with piecewise algebraic surfaces. A space partition is needed at first. But they haven’t presented an automatic and effective approach for such a space partition. In this paper, we adopt a new framework to blend n circular quadrics. The blending process includes two main steps. At first, we divide each boundary circle into two halves and then blend along two adjacent semicircles with rational bicubic B´ ezier patches. These blending patches enclose two holes. We then use S-patches to fill the holes. The whole blend is G 1 continuous and the shape of each blending patch can be intuitively adjusted by changing its free parameters. 2. Boundary division and 2-way blending In this paper, circular quadrics refer to six primitives: cylinder, cone, sphere, one-sheet hyperboloid, paraboloid and plane (a degenerate quadratic surface). When there are n(n> 2) quadrics (base surfaces), the blend belongs to n- way blending. Especially, when n =2, it is 2-way blending. Definition 2.1 Let QS 1 , QS 2 ,...,QS n for (n > 2) be the base surfaces, Pl 1 ,Pl 2 , ...,Pl n be their sec- tion planes, C 1 ,C 2 ,...,C n be the intersection circles and O 1 ,O 2 , ...,O n be the centers of these circles. Assuming that O 1 ,O 2 ,...,O n form a spacial n-polygon, we need to construct a surface which meets the base surfaces with G 1 continuity along the respective intersection circles. Let O be the barycenter of O 1 ,O 2 ,...,O n . The plane through the axis of QS i and the point O divides C i into two semicircles SC i,1 and SC i,2 . Now we need to construct a rational bicubic patch BP i to blend QS i and QS i+1 along SC i,2 and SC i+1,1 (i =1,...,n and i +1 = 1 when i = n). This is a 2-way blending problem in fact, we use a bicubic rational B´ ezier patch as the blending surface. As illustrated in Fig. 1, BP i blends QS i and QS i+1 along SC i,2 and SC i+1,1 respectively. Assume that BP i (u, v)= 3 j1=0 3 j2=0 ¯ ω j1,j2 P j1,j2 B 3 j1 (u)B 3 j2 (v)/W, (1) where W = 3 j1=0 3 j2=0 ¯ ω j1,j2 B 3 j1 (u)B 3 j2 (v), u, v [0, 1]. The concrete method of determining BP i has been dis- cussed in paper [7]. 3. Construction of S-patches The theory of S-patches was presented by Loop and DeRose in 1989 ([8]). This class of patches refer to a _____________________________ 978-1-4244-3701-6/09/$25.00 ©2009 IEEE

Upload: weiyin

Post on 28-Feb-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Blending Circular Quadrics with Parametric Patches

Mei-e FangSchool of Computer ScienceHangzhou Dianzi University

Hangzhou, [email protected]

Guozhao WangDepartment of Mathematics

Zhejiang UniversityHangzhou, [email protected]

Weiyin MaDepartment of MEEM

City University of Hong KongHong Kong, [email protected]

Abstract

A method of blending circular quadrics with parametricpatches is proposed in this paper. It needs n rational bicubicBezier patches and two S-patches to blend n (n > 2)quadrics. The blend is G1 continuous. Explicit formulaeof control points of both Bezier patches and S-patches arederived from the corresponding G1-continuity conditions. Inaddition, the shape can be intuitively modified by adjustingthe free parameters of the blending surfaces.

1. Introduction

Surface blending is an important topic in geometricmodelling. Simple and classical quadrics are also popularlyused in engineering applications. The blending problem ofquadrics thus deserves further research. For 2-way blendingof circular quadrics, many methods were proposed. In thosemethods, many different blending surfaces are adopted,including parametric surfaces, implicit surfaces and subdivi-sion surfaces etc. For n-way blending of circular quadrics,one may also find a few existing methods([1-6]).Somesubdivision methods designed for general parametric basesurfaces can be used to blend quadrics. But we know that asuitable initial frame of subdivision surface is often difficultto construct for blending problem. Additionally, subdivisionmethods can only obtain an approximate surface result. Wuand Zhou([3]) blended several quadrics with an algebraicsurface. They transformed blending into solving a linearsystem. But such an algebraic surface exists only when allblending boundaries lie on a certain quadric. Chen et al.([4])proposed to blend several quadrics with piecewise algebraicsurfaces. A space partition is needed at first. But they haven’tpresented an automatic and effective approach for such aspace partition.In this paper, we adopt a new framework to blend n circularquadrics. The blending process includes two main steps. Atfirst, we divide each boundary circle into two halves and thenblend along two adjacent semicircles with rational bicubicBezier patches. These blending patches enclose two holes.We then use S-patches to fill the holes. The whole blend is

G1 continuous and the shape of each blending patch can beintuitively adjusted by changing its free parameters.

2. Boundary division and 2-way blending

In this paper, circular quadrics refer to six primitives:cylinder, cone, sphere, one-sheet hyperboloid, paraboloidand plane (a degenerate quadratic surface). When there aren(n > 2) quadrics (base surfaces), the blend belongs to n-way blending. Especially, when n = 2, it is 2-way blending.

Definition 2.1 Let QS1, QS2, . . . , QSn for (n > 2)be the base surfaces, Pl1, P l2, . . . , P ln be their sec-tion planes, C1, C2, . . . , Cn be the intersection circles andO1, O2, . . . , On be the centers of these circles. Assumingthat O1, O2, . . . , On form a spacial n-polygon, we need toconstruct a surface which meets the base surfaces with G1

continuity along the respective intersection circles.Let O be the barycenter of O1, O2, . . . , On. The plane

through the axis of QSi and the point O divides Ci into twosemicircles SCi,1 and SCi,2. Now we need to construct arational bicubic patch BPi to blend QSi and QSi+1 alongSCi,2 and SCi+1,1 (i = 1, . . . , n and i+1 = 1 when i = n).This is a 2-way blending problem in fact, we use a bicubicrational Bezier patch as the blending surface.

As illustrated in Fig. 1, BPi blends QSi and QSi+1 alongSCi,2 and SCi+1,1 respectively. Assume that

BPi(u, v) =3∑

j1=0

3∑j2=0

ωj1,j2Pj1,j2B3j1(u)B3

j2(v)/W, (1)

where

W =3∑

j1=0

3∑j2=0

ωj1,j2B3j1(u)B3

j2(v), u, v ∈ [0, 1].

The concrete method of determining BPi has been dis-cussed in paper [7].

3. Construction of S-patches

The theory of S-patches was presented by Loop andDeRose in 1989 ([8]). This class of patches refer to a

_____________________________ 978-1-4244-3701-6/09/$25.00 ©2009 IEEE

Figure 1. The construction of the blending patch BPi.

P

Pi

P1(0,0)

Pn(0,1)

Pi+1

P2(1,0)

Pi−1

ti

ti−1BPi−1

BPi

ui−1

uivi−1

vi

SP(pi)

QSi.

.

..

.

...

. . . .

bi,1

bi,2bi,3bi,4

bi+1,1 bi+1,2

Figure 2. The definition domain of S-patch used to fill an-sided hole and its surrounding patches.

generalization of Bezier surfaces which allowed to be de-fined over any convex polygonal domain. They are popularlyused to connect surfaces ([9][10][11]). We select S-patchesto fill holes because that they have similar properties tosurrounding Bezier surfaces and only one patch is neededto filling a hole. The boundaries of one hole are given byBPi(ui, 0), i = 1, . . . , n. Another hole is surrounded byBPi(ui, 1), i = 1, . . . , n. Two holes are filled using the samemethod, so we only introduce the method dealing with thelatter. As indicated by Fig. 2, the regular n-polygon P is thedefinition domain. p1, . . . , pn are its vertices. �ti = pi+1−pi

and E(ti) = (1 − ti)pi + tipi+1, ti ∈ [0, 1]. According tothe representation of surrounding patches BPi constructedby 2-way blending method, it’s not difficult to obtain thefollowing relations:(A0) BPi−1(1, 1) = BPi(0, 1);(A1) ∂BPi−1

∂ui−1(1, 1) = −∂BPi

∂ui(0, 1);

(A2) ∂BPi−1∂vi−1

(1, 1) = −∂BPi

∂vi(0, 1).

The G0-continuity condition requires that SP (Ei(ti)) =BPi(ti, 1), ti ∈ [0, 1], i = 1, . . . , n. Again, the sufficientand necessary conditions of G1-continuity between SP andBPi(i = 1, . . . , n) require:(B0) D�ti

SP (Ei(ti)) = ∂BPi

∂ui(ti, 1), ti ∈ [0, 1];

(B1) ∃μ, ν : [0, 1] → R, s.t.

D−�ti−1SP (Ei(ti)) = μ(ti)·∂BPi

∂ui(ti, 1)+ν(ti)·∂BPi

∂vi(ti, 1).

In order to construct appropriate μ and ν, we impose twoendpoint conditions and one twice differentiable condition

on (B1). Then we get(C0) −∂BPi−1

∂ui−1(1, 1) = μ(0) · ∂BPi

∂ui(0, 1)+ν(0) · ∂BPi

∂vi(0, 1);

(C1) ∂BPi

∂ui(0, 1) = (μ(1) + 2 cos 2π

n ) · ∂BPi−1∂ui−1

(1, 1) + ν(1) ·∂BPi−1∂vi−1

(1, 1);(C2) −μ′(0) · ∂BPi

∂ui(0, 1)−μ(0) · ∂2BPi

∂u2i

(0, 1) −ν′(0)∂BPi

∂vi−

ν(0)· ∂2BPi

∂vi∂ui(0, 1) = μ′(1)· ∂BPi−1

∂u(i−1) (1, 1)+(μ(1)+2 cos 2πn )·

∂2BPi−1

∂u2i−1

(1, 1)+ν′(1)· ∂BPi−1∂vi−1

(1, 1) +ν(1)· ∂2BPi−1∂vi−1∂ui−1

(1, 1).Based on (A1) and (A2), μ(0) = 1, μ(1) = −1 −2 cos 2π

n , μ′(0) = μ′(1) and ν(0) = 0, ν(1) = 0, ν′(0) =ν′(1) are sufficient for the above constraints. Choosing μto be a quadratic polynomial, it can be uniquely determinedusing the above corresponding conditions, i.e. μ(t) = (−2−2c)t + 1, where c = cos 2π

n . If ν is also chosen to bequadratic polynomial, we’ll get ν(t) ≡ 0, which conflictswith G1-continuity. So the minimal degree of ν is threeand we take ν(t) = δB(−2t3 + 3t2 − t), where δB is a freeconstant factor. From the relation (B1), we can conclude thatthe depth of S-patch SP , which meets surrounding patchesBPi(i = 1, . . . , n) with G1-continuity, must be at least 7.Let SP be represented as

SP (p) =∑�i

c�iB7�i(l1(p), . . . , ln(p)), (2)

where (l1(p), . . . , ln(p)) is the barycenter coordinate of p inP . Again, let blending boundaries be

BPi(ui, 1) =3∑

j=0

bi,j+1B3j (ui).

We can easily get

∂BPi

∂ui(ti, 1) = 3

2∑j=0

(bi,j+2 − bi,j+1)B2j (ti), (3)

∂BPi

∂vi(ti, 1) =

3∑j=0

(bi,j+1 − Pi,j+1)B3j (ti), (4)

where Pi,j are the row adjacent to bi,j(j = 1, 2, 3, 4) ofcontrol points of BPi. bi,j are control points of boundarycurves BPi(ui, 1) as illustrated in Fig. 2 (right).Substituting equations (2) and (3) into the relation formula(B0), we obtain

c7�ei= bi,1

c6�ei+�ei+1 = 47bi,1 + 3

7bi,2

c5�ei+2�ei+1 = 17bi,3 + 4

7bi,2 + 27bi,1

c4�ei+3�ei+1 = 135bi,4 + 12

35bi,3 + 1835bi,2 + 4

35bi,1

c3�ei+4�ei+1 = 135bi,1 + 12

35bi,2 + 1835bi,3 + 4

35bi,4

c2�ei+5�ei+1 = 17bi,2 + 4

7bi,3 + 27bi,4

c�ei+6�ei+1 = 47bi,4 + 3

7bi,3

(5)

Further, we substitute u(t) = (−2 − 2c)ti + 1, v(t) =δB(−2t3i + 3t2i − ti) and equations (2), (3) and (4) into

CO

OO

OO

O

OO

O

OOOOOOO

OO

OOOOOOOOO

OO

OOOOOOO OO

OO

OO

OO

OO

OO

O

OO

OO

OO

OO

OO

OO

OO

OO

OO O O O O O O

OO

O

OO

******************

**** ** ** *******

* * * **** ** **

*** ** ** ** ** **

* *

******

*c7e1

c7e2

c7ei−1

c7ei

c7en

c7ei+1

cei−2+(7−j−1)e

i+je

i+1

cei−3+(7−j−1)e

i+je

i+1

cei−(n−2)

+(7−j−1)ei+je

i+1

c(7−j−1)ei+(j+1)e

i+1c(7−j)e

i+je

i+1

cei−1+(7−j−1)e

i+je

i+1

O

O O

*

**

Figure 3. A portion of control net of a S-patch of depth7 and the vertices of the j-th control polygon on the i-thboundary.

the relation formula of (B1). After corresponding deriva-tion computation and some tedious transformation betweenmonomial basis and Bernstein basis, we obtain

c5�ei+�ei+1+�ei−1 = c6�ei+�ei+1 + 17 ( 2−c

3 μ0 + 16μ1 − δB

6 ν0),c4�ei+2�ei+1+�ei−1 = c5�ei+2�ei+1 + 1

7 ( 1−2c3 μ0 + 3−2c

15 μ1

+ 115μ2 − 2δB

15 ν0 − δB

15 ν1),c3�ei+3�ei+1+�ei−1 = c4�ei+3�ei+1 + 1

7 (−cμ0 + 1−4c10 μ1

+ 1−c10 μ2 − δB

20 ν1 − δB

20 ν2),c2�ei+4�ei+1+�ei−1 = c3�ei+4�ei+1 + 1

7 (−1−4c3 μ0 + −2−12c

15 μ1

− 2c5 μ2 + 2δB

15 ν0 + δB

15 ν1 − δB

15 ν3),c�ei+5�ei+1+�ei−1 = c2�ei+5�ei+1 + 1

7 (−2−5c3 μ0 + −3−8c

6 μ1

− 1+3c3 μ2 + δB

6 (ν0 + ν1 + ν2 + ν3)),

,

(6)where

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

μ2 = 9bi,2 − 3bi,1 − 9bi,3 + 3bi,4

μ1 = −12bi,2 + 6bi,1 + 6bi,3

μ0 = 3bi,2 − 3bi,1

ν3 = Pi,1 − bi,1 + 3bi,2 − 3Pi,2 − 3bi,3 + 3Pi,3

+bi,4 − Pi,4

ν2 = 3bi,1 − 3Pi,1 − 6bi,2 + 6Pi,2 + 3bi,3 − 3Pi,3

ν1 = −3bi,1 + 3Pi,1 + 3bi,2 − 3Pi,2

ν0 = bi,1 − Pi,1

.

Then G1-continuity conditions are converted into the con-ditions about the control points. Except for those boundarycontrol points listed in equation (5) and those adjacentto boundary control points listed in equation (6), otherinterior control points can be chosen freely. In order to makethe whole S-patch smooth, we determine its parameters

empirically. In the following, we give the procedure fordetermining the control net C of SP .

• Let C be initial control net of a depth 3 S-patch. Itsboundary control points are c3�ei

= bi,1, c2�ei+�ei+1 =bi,2, c�ei+2�ei+1 = bi,3. Its interior control pointsare computed by c�i = (i1, i2, . . . , in) ∗ I−1 ∗(v1, v2, . . . , vn)T , where vi = δI( 4

3bi,2 − 13Pi,2), δI is

a free parameter, I = (aij)n×n, aij = 1 only wheni = 1, . . . , n and j = i − 1, i + 1, otherwise aij = 0;

• Elevate c to depth 7 to get a new control net C;• Reset those control points of C marked with circle

symbol in Fig. 3 by equations (5) and (6);• Reset control points marked with star symbol by the

following procedure.for i = 1 to n and for j = 0 to 6 dovn = c�ei−1+(7−j−1)�ei+j�ei+1 ; v1 = c(7−j)�ei+j�ei+1 ; v2 =c(7−j−1)�ei+(j+1)�ei+1 ;for k = 2 to n − 2, doc�ei−k+(7−j−1)�ei+j�ei+1 = (v2 − v1, vn − v1, 0) ∗pn−k+1 + v1;end kend i, j.

4. Adjustment of free parameters and exam-ples

For each S-patch used to fill a n-sided hole, we set twoparameters δB and δI to adjust its shape. δB is called aboundary parameter. We often take δB ∈ (0, 20]. Changingits value, we can adjust the shape of S-patch near eachblending boundary. δI is called an interior parameter. Weoften take δI ∈ (0, 2]. We can adjust the interior shape ofthe S-patch intuitively through changing the value of δI .Figs. 4 and 5 illustrate the blending of three-cylinders andfive-conics, respectively. In Fig. 4, the two cylinders areperpendicular to each other. From Fig. 5, we can see howthe two free parameters affect the shape of an S-patch. Thetwo figures have the same boundary parameter and differentinterior parameters. δI equals to 1.1 in the first figure and1.5 in the second.In Fig. 6, the axes of cylinders and paraboloid are agonic.The whole blending surface is smooth seen from differentperspectives.

5. Conclusion

For n-way blending problem of quadrics, those existingmethods are either with stern conditions, or without anautomatic algorithm, or only suitable for special numberof quadrics. Furthermore, their blending surfaces belongto subdivision surfaces or algebraic surfaces. We adoptparametric surfaces, which are more convenient formodelling. The whole blending surface is G1-continuous.

Figure 4. The blend among three cylinders.

Figure 5. The results of blending among five conics withdifferent free parameters.

Furthermore, each blending patch can be adjusted intuitivelythrough changing some free parameters. It can be usedto blend any number of quadrics. Because in the firststep of blending, all computations upon base surfacescan be processed under their standard forms, modellingby this method becomes very convenient and effective.Furthermore, this method can be easily extended to blendother base surfaces, for example elliptical quadrics andtoruses.

Figure 6. The blend of three elliptic cylinders and threeparaboloid.

Acknowledgment

This work was partially supported by the National Sci-ence Foundation of China (Grant No. 60773179), the StateKey Basic Research Program 973 of China (Grant No.G2004CB318000), and the Research Grants Council of theHong Kong Special Administrative Region, China (GrantNo. CityU 1184/06E).

References

[1] Warren J., 1989. Blending Algebraic Surfaces. ACM Transac-tions on Graphics, 8(4): 263-278.

[2] Chen F. L. , Deng J. S., Feng Y. Y., 2000. Algebraic SurfaceBlending using Wu’s Method. Proc. of ASCM’00, WorldScientific, Singapore, 171-181.

[3] Ohbuchi R., Kokojima Y., Takahashi S., 2001. Blending shapesby using subdivision surfaces. Computers and Graphics, 25(1):41-58.

[4] LI G. Q., LI H., 2002. Blending Parametric Patches with Sub-division Surfaces. Journal of computer science and technology,17(4): 498-506.

[5] Wu T. R., Zhou Y. S., 2000. On blending of several quadraticalgebraic surfaces. Computer Aided Geometric Design, 17(8):759-766.

[6] Chen C. S., Chen F. L., Feng Y. Y., 2001. Blending quadricsurfaces with piecewise algebraic surfaces. Graphical Models,63(4): 212-227.

[7] Fang M.E, Wang G.Z., 2007. Blending Quadric Surfaces withRational Bicubic B zier Patches. Journal of Computer-AidedDesign and Computer Graphics, 19(9): 1148-1153. (in chinese)

[8] Loop C., DeRose T., 1989. A multisided generalization ofBezier surfaces. ACM Transactions on Graphics, 8(3): 204-234.

[9] Loop C., DeRose T., 1990. Generalized B-spline surfaces ofarbitrary topology. Computer Graphics, 24(4): 347-356.

[10] Karciauskas K., 2003. Rational M-patches and tensor-borderpatches. Contemporary mathematics, 334: 101-128.

[11] Karciauskas K., Peters J., 2005. Polynomial C2 spline sur-faces guided by rational multisided patches. In: Juttler B.,Dokken T. (eds.), Computational Methods for Algebraic SplineSurfaces, Springer, 119-134.