Rational cubic circular arcs and their application in CAD

Rational cubic circular arcs and their application in CAD

Computers in Industry 16 (1991) 283-288 Elsevier 283 Short Note Rational cubic circular arcs and their application in C A D Guo-Jin Wang Departmen...

213KB Sizes 5 Downloads 49 Views

Computers in Industry 16 (1991) 283-288 Elsevier

283

Short Note

Rational cubic circular arcs and their application in C A D Guo-Jin Wang

Department of Applied Mathematics, Zhejiang University, Hangzhou, 310027, China The necessary and sufficient conditions for representing a circular arc as a rational cubic Brzier curve are investigated. A corresponding construction law is described. As an application, the method for representing the surface of revolution in a rational bicubic Brzier form is presented.

Keywords: Circular arc, Surface of revolution, Rational cubic Brzier curve, Rational bicubic Brzier surface.

1. Introduction The rational cubic Brzier curve has the a d v a n t a g e of i n c o r p o r a t i n g b o t h conic a n d p a r a m e t r i c cubic curves as special cases [1]. Its use in C A D / C A M is b e c o m i n g increasingly widespread. I n order to represent a circular arc as a rational cubic Brzier curve, we m a y first represent it as a rational quadratic Brzier curve [1-3] a n d t h e n elevate its degree to get a cubic. It is worth to notice that the curve 3 3 R(T)= ~ _ ~ B j , 3 ( T ) H j R j / Y ' ~ B j , 3 ( T ) H j, O ~ < T ~ < I ; H i > O , j=0,1,2,3 (1) j=0 j=O we c a n get with this m e t h o d is very special. Its control p o i n t s a n d weights have to satisfy the following two expressions:

H o - 3HI + 3 H : - H 3 = O , HoR o - 3HIR 1 + 3H2R 2 - H3R 3 = O. However, there are m a n y r a t i o n a l cubic Brzier curves r e p r e s e n t i n g the same circular arc whose control points a n d weights do n o t satisfy the above two expressions. F o r greater generality, we show i n this note how to find those curves, give the necessary a n d sufficient c o n d i t i o n s for r e p r e s e n t i n g the circular arc as the curve (1), a n d describe a c o r r e s p o n d i n g c o n s t r u c t i o n law. As a n application, we discuss a m e t h o d for defining the rational b i c u b i c surface of revolution, which is useful in C A D / C A M .

2. Main results The necessary a n d sufficient c o n d i t i o n s for r e p r e s e n t i n g the circular arc whose central angle is 2A (0 < A < ~) a n d whose radius is L . csc A as curve (1) are: (a)

The four p o i n t s Ro, R1, R 2 a n d R 3 a r e c o p l a n a r ;

0166-3615/91/$03.50 © 1991 - Elsevier Science Publishers B.V.

(2)

284

ShortNote

Computersin Industry

Ra

Ra

Y

X 0

R~

-X

Fig. 1. Rational cubic B&ier representatxon of the circular arc. (b)

AR1RoR 3 = / R 2 R 3 R o ~ (0, 2 " ~ / 3 ) ;

(c)

4(L-

(d)

4 L ( L - L23 cos A ) H2 3L21 = H0~2 ;

L01 cos

4L(L-L (e) where

A ) ( L - L23 cos A ) = Lo,L23;

m cosA) 3L~3

(3) (4)

(5)

H22 = H1-----~3"

(6)

Bj,3(T ) ( j = 0, 1,' 2, 3) are c u b i c B e r n s t e i n - B 6 z i e r basis f u n c t i o n s , a n d

L = ½1R3- Rol, L,-1,i=IR,-Ri

(7) 11,

i=1,2,3.

(8)

It is easy to see that the c o n d i t i o n s m a y b e d i v i d e d i n t o two p a r t s : o n e for B6zier p o i n t s a n d the o t h e r for weights. Let us n o w p r o v e the a b o v e results.

Proof. Since R'(O)= 3 H , ( R 1 - Ro)/Ho,

R'(I)

= 3H2(R3- R2)/H3,

we k n o w t h a t (2) is necessary. F r o m g e o m e t r i c i n v a r i a n c e of the r a t i o n a l B6zier curve, the a b o v e results will b e p r o v e d p r o v i d e d we p r o v e these results i n a special c o - o r d i n a t e system. Guo-Jin Wang was born in Shanghai, China on October 6, 1944. He is now an associate professor of applied

mathematics at the Zhejiang University, Hangzhou, China. His teaching and research interests include computer aided geometric design, computer graphics and mathematical aspects of computer-aided design. Wang received his BS and MS in mathematics from the Zhejiang University. He is a member of the Chinese Mathematics Association, as well as a member of the National Laboratory of CAD and Computer Graphics in China.

Computers in Industry

G. Wang / Rational cubic circular arcs

Referring to Fig. 1, now we may choose the origin of co-ordinates to be the middle point > segment R, R, and the direction of the position X-axis to be this of the vector R0 R 3, and let

285

of the line

R,=(X,, y,) j=O,l,2,3, y,,Y,>O,

R(T)=(X(T),

Y(T)),

thus (X0,

Y”) = (-L,

It is obvious X’(T)

0>,

(X3, Yi) = (L, 0).

that the circular

+ (Y(T)

arc is represented

as (1) if and only if

+ L ctg A)* = L2 csc2A,

Or

[A(1-T)4+BT(l-T)3+CT~(1-T)2+DT’(1-T)+ET~]T(1-T)~O

O
(9)

where A = 6&H,

L (L sin A + Xi sin A - Y, cos A),

B=9H~[(L2-X~-Y~)sinA-2LY,cosA]+6~~H,L(LsinA+X2sinA-Y2cosA), YiYz) sin A - L( Y, + Y,) cos A] + 4H,H,L*

C=18HiHz[(L2-XiX2D=9H;[(L2-Xi-

Y:)

E = 6H,H,L(L According

sin A-2LY,cos

A] +6H,H,L(L

sin A-X,

sin A, sin A-Y,

cos A),

sin A - X, sin A - Y, cos A).

to linear

independence

of the quartic

Bernstein-BCzier

basis functions,

we have

A=B=C=D=E=O. From

(10)

A = E = 0 it is easy to see that

(L+X,)/Y,=(L-X,)/Y,=ctg

A,

(11)

whence the angle A = /R,R,R, = LR,R,R,. Suppose A # q/2. On rearranging the equations may obtain 4LX, cos*A i

=- H,H,

9[L’+L(X,-X2)+X,X,cos2A] 4LX, cos2A

On eliminating -X,

= L-

(12)

H&3

=- H,’ HI H3

3(L-x2)2

i X,=L-

we

HoH2’ 2L2 cos*A

I

Yi and Y2 by (ll),

H;

3(L+x,)2

-

B = C = D = 0 and eliminating

X, and

X2 in (12) from the relations

L,, cos A,

(13)

L,, cos A,

we have (5), (6) and 2L2 9 [ LO, L23 -2(L-L,, Comparing

cos A)(L-L,,

the above equation

cos A)]

=- HIH, H,H,’

and the result which is obtained

by multiplying

(5) and (6), we obtain

(4).

286

Short Note

Computers in Industry

Now suppose A = ~/2. Then (10) may be expressed by 4L 2 = LmL23,

4HoH2 L2 = 3HZL~,

4HIH3L 2 = 3H2L~3.

This is a particular case of (4), (5) and (6). Finally, (4) can be written as 4 [ L 2 - L(Lol + L23 ) cos A] = (1 - 4 cos2A)LmL23 . When A >~ ,~/2, we have cos A ~< 0. From the above equation the angle A must be less than 2"~/3. Q.E.D.

3. A construction law We now point out the geometric significance of expression (4): The intersection point S * of two diagonal lines RoR 2 and R1R 3 of the quadrilateral RoR1R2R 3 must lie on the circular arc (1), and it follows that RoR1R2R 3 is a convex polygon. In fact, without loss of generality in the following discussion, we may choose the co-ordinate system as in Fig. 1, and let the co-ordinates of the point S * be ( a * , b* ). Then it is easy to find that the co-ordinates of the points R 1 and R 2 are the following values respectively:

(+b* ctgAT(L-T-a*) ~-c~g/l--+-(L-~-a~)

2b*L .L,

)

b* ctg A + ( L T - a * )

Thus L m and L23 are equal to 2b*L/(b* cos A + (L-Y-a*) sin A), respectively. The above results are now substituted into (4), and we obtain (b* ctg A - L ) 2 - b .2 csc2A = a .2. This means that point S * must lie on the circular arc (1). From the geometric significance of the expressions (2)-(4), we may obtain the following:

Construction Law 1. If the central angle 2A (0 < A < 2"~/3) and the radius R of the circular arc have been given, then the corresponding rational cubic B~zier points R j ( j = 0, 1, 2, 3) may be constructed as follows (see Fig. 1): Step 1. Draw the line segment RoR 3 such that I R0 - R 31 = 2R sin A. t

t

t

t

Step 2. Draw the half lines RoR o and R3R 3 such t h a t / R o R o R 3 = ZR3R3R o = A. Step 3. Draw the half lines RoO' and R30' normal to the half lines RoR o and R3R ~ respectively, such that the point O ' is the intersection between RoO' and R30'. Draw the circular arc RoR~ whose circle center is the point O ' and radius is O'Ro, such that RoR 3 lies entirely inside the angle R'oRoR 3. Step 4. Arbitrarily choose the point S * on the circular arc )~0R3, draw the straight lines RoS* and R3S*, find the point R 2 which is the intersection of the lines RoS* and R3R'3, and find the point R 1 which is the intersection of the lines R3S* and RoR'o. After construction of the B6zier points R/, the weights Hj ( j = 0, 1, 2, 3) may be choosen by (5) and (6). Thus the circular arc can be denoted by the curve (1).

4. Application The surface of revolution is often used in engineering. By the method of linear axis design, which is described in [1], we may represent the surface of revolution as a rational bicubic B6zier surface. This representation is based on the rational cubic circular arcs.

Computers in Industry

G. Wang / Rational cubic circular arcs

287

Let us choose the Z-axis as the axis of symmetry, the parameter S as the longitudinal profile parameter, and the parameter T as the cross-section parameter (0 ~< S, T 4 1). Thus the surface of revolution takes the form

R(S, T) = F(S, T) + Z(S)k,

(14)

where F(S,

T)=X(S,

r)i+

Y(S, T)j

[R0(S), RI(S),

R2(S),

R3(S)]. [(1 - T)3H o, 3(1 -

[ H o, H 1, H 2, H 3 ] - [ ( 1 - T ) 3, 3(1 -

T)2TH,, 3(1

T)2T,

-

T)T2H2, r H3] 3

t

r']

3(1 - r ) r L

(15) in which R,(S) (i = 0, 1, 2, 3) indicates the positions of the vertices of the control polygon of the cross-section at Z = Z(S). For a given value of S, the cross-section curve F(S, T) is a circular arc. Taking the curve F(0, T ) as a basic cross-section, then

F(S, T)=A(S)F(O, T)/A(O)

(suppose A(0)4= 0),

(16)

where the circular arc F(0, T ) may be represented by the rational cubic B6zier form, A(S) and Z(S) together describe the longitudinal profile. The scaling curve A = A(S), Z = Z(S) may be represented by a rational cubic B6zier curve in the A-Z plane, with its own control polygon PoPaPzP3(see Fig. 2). Thus

A(S) Z(S)

[(1 - S)3Go, 3(1 -

[(1 - S) 3, 3(1 [(1 - S)3Go, 3(1 -

S)2SG1, 3(1

S)$2G2, $3G3] • [A o, A1, A2, - S)2S, 3(1 - S)S 2, S3] • [Go, GI, G2, G3] t

A3] t

S)2SG1, 3(1 -

Z3] t

-

[(1 - S ) 3, 3(1 - S ) 2 S , 3(1 -

S)S2G2, S3G3] • [Zo, Z l , Z2, S)S 2, $3] - [Go, G1, G2, G3] t

'

(17)

(18)

Thus the surface of revolution is given by 3

3

3

3

R(S, T) = ~ Y'~ B,,3(S)Bj,3(T)GiHjRo/ ~, ~_, Bi,3(S)Bj,3(T)G, Hj, i=0 j = 0

i=0 j=0

Z Ra

P3

73 ZaI" Zt

111

Ze

No

1

Pe

0

Fig. 2. The longitudinal profile.

(19)

288

Short Note

Computers in Industr

where

Ioo o31 iAo] Rio

Rll

RI2

R13 ] =

R20

R21

R22

R23 ]

Too A 2

R30

R31

R32

R33 J

A3

1

A1

• [Ro(0), R~(0), R~(O), R~(0)] +

z0] gl

Z2 Z3

.

[k, k, k, k]

(20)

Acknowledgement This work has been supported by the National Natural Science Foundation of China.

References [1] I.D. Faux and M.J. Pratt, Computational Geometry for Design and Manufacture, Ellis Horwood, Chichester, UK, 1979. [2] E.T.Y. Lee, "The rational B6zier representation for conics", in: Farin (ed.), Geometric' Modeling, SIAM, 1987, pp. 3 19. [3] W. Tiller, "Rational B-splines for curve and surface representation", 1EEE Comput. Graph. Appl., Vol. 3, No. 9, 1983, pp. 61-69.