Modified Mehod for Generaing B-Spline Crves of degree Three and heir Conrolling Dr. A.M.S. Rahma Dr. A.Y. Abdllah Dr. A. M. J. Abdl-Hssen monemrahma@yahoo.com Drali8@yahoo.com Dralmaalymohssen@yahoo.com Universiy of Technology Universiy of Technology Universiy of Technology Dep. of Comper Deparmen Dep. Of applied Science Dep. Of Comper Deparmen Absrac The reacion beween designer and design needs modified mehods o conrol he design. This paper presens modified mahemaical echniqe for conrolling he generaion of he D designs of hird degree by sing modified Gallier of Bezier crves. The paper discses a polynomial in erms of polar forms wih respec o he parameer. The modified mehod has resled in good saring poin o generae which D design algorihm which allows he designer o prodce a design in combinaional way allows him o ge he shape ha he has in his mind eeping he for conrol poins for D design. The mehod shows a grea flexibiliy in D design conrolling area wih changing. There is no need o change he conrol poins of he design; moreover efficiency in designs is obained in comparison wih ha needed for convenional mehods. من الدرجة الثالثة والسيطرة عليها B-Spline تطوير طريقة لتوليد منحنيات د. عبد لمنعم صالح رحمة د.علي يوسف عبدهللا د. عبدا لمحسن جابر عبد الحسين الخالصة تطوير التفاعل بين المصمم والتصميم يحتاج الى تطوير طرق التحكم بالتصميم وهذا البحث يعرض للسةيطر علةى توليةد التصةاميم ثنأئيةة ألبعةاد مةن الدرجةة اللاللةة. بأسةتادا مطةور تقنيةة رياضةي. تم مناقشة منحنةي متعةدد الحةدود ةي ألسةتقطا لحةدود تطوير Gallier لمنحني B-Spline المفصلية بالنسبة الى المتغيرات. وهذا السبب يعطي نقطة بداية جيد ألقتراح تقنيةة لتوليةد التصةاميم ثنائية ألبعاد والذي يتيح للمصمم توليدالمنحني وتطوير بطريقةة تفاعليةة تمكنةة مةن الحصةو علةى ثنائيةة الهيكليةة للماطة مع نقاط السيطر االربعة الشكل الذي كونة ي مايلتة مع االحتفاظ بتوا ق ألبعاد. ثبتت الطريقة المقترحة مرونة عالية ي مجا التحكم بالتصميم ثنائيةة ألبعةاد مةن دو تغييةر نقةاط السيطر للتصميم. كذلك ثبتنا الطريقة نها كلر كفاء ي التصاميم بالمقارنة مع مايوجةد مةن طةرق سابقة.
-Inrodcion This paper aes p he sdy of a polynomial crve. Polynomial crve is defined in erms of polar forms. Naral way o polarize polynomial crve. The approach yields polynomial crve.i is shown versions of he de- Boor algorihm can be rned ino sbdivisions by giving an efficien mehod of performing sbdivision. I is also shown ha i is easy o compe a new conrol ne from given ne. Iniively his depends on he parameers his is one of indicaions ha deals wih crve. The affine frame for simpliciy of noaion is denoed as F (. Iniively a polynomial crve is obained by bending he real affine crve sing a polynomial map. This presen mehod a differen mehod for conrolling and generaing he D design. The arihmeical echniqe is sed o generae Gallier cbic B-Spline crve by sing de- Boor algorihm as given in [ [.This new wor is modified for conrolling and generae crves wih no need o change he conrol poins of B-Spline crve. -Polar Form of a Polynomial Crve. [ [. A mehod of specifying polynomial crves ha yield very nice geomeric consrcing he crves is sed he polar polynomial form. Consider a polynomial of degree wo as F(X =a X bxc. The fncion of wo variables f(xx=axxbxc. The polynomial F (X on he diagonal in he sense ha F(X=f (X X for all XR f is affine in each of xand x. I wold be emping o say ha f is linear in each of x and x his is no re de o he presence of he erm bx and of he consan c and f is only biaffine. No ha f(x x=axxbxc. Also affine and F(X=f(X X for all XR. To find a niqe biaffine fncion f sch ha F (X=f (X X for all XR and of corse sch a fncion shold saisfy some addiion propery. I rns o ha reqiring f o be symmeric. The fncion f of wo argmens is symmeric iff f(xx=f(xxfor all xx o mae f(and f symmeric simply form : f(xx=[f(xxf(xx/ = [a(xx a(xx bxbx cc/ = a(xx [bxbx/c. This called he polar form of qadraic polynomial of F. Given a polynomial of degree hree as F(X =ax bx cxd. The polar form of F is a symmeric affine fncion f: A A ha aes he same vale for all permaions of x x x; ha is f(x x x=f(x x x =f(x x x=f(x x x =f(x x x=f(x x x. Which is affine in each argmen and sch ha F (X=f(X X X for all XR by same way of second degree as f (x x x=axxx [ xx xxxx/c[xxx/ d. This called he polar form of cbic polynomial of F. Example : Consider he polynomial of degree wo given by F(=0 F(= -. The polar forms of F=x ( and F =y ( are f( = ( f( =-(. Noe ha f ( is he polar form of F=x ( and f ( is he polar form of F =y(. Example : Consider a plane cbic which is defined as follows F(=0
F(= -. The polar forms of F= x ( and F = y ( are f( = 0( f( = -(. Also noice ha f ( is he polar form of F= x ( and f ( is polar form of F = y (. -The De Boor Modificaion of De Casela Algorihm Consider one more generalizaion of he de Casela algorihm. This generalizaion will be sefl when deal wih spline sch a version will be called he progressive version for reasons ha will become clear shorly when dealing wih spline. Definiion [ [. Consider conrol poins in he form f(-i -i i 0 i sppose he degree hree (m= where i are real nmbers Z (where Z is ineger nmber aen from he seqence {-i -i i i i i } of lengh (m= saisfying cerain ineqaliy condiions. The seqence {-i -i i i i i } is said o be progressive iff he ineqaliies indicaed in he following array hold: - - Is obaining as following:- A sage - - and. This corresponds o he inqaliies on main descending diagonal of he array of ineqaliy condiions. A sage -.This corresponds o he ineqaliies on second descending diagonal of he array of ineqaliy condiions. A sage.this corresponds on hirdlowes descending diagonal of he array of ineqaliy condiions. For example a = and m=. Consider conrol poins in he form f( i i i 0 i and sppose i aen from he seqence { } of lengh (m= saisfying cerain ineqaliy condiions. The seqence { } is said o be progressive iff he ineqaliies indicaed in he following array hold: Is obaining as following; A sage A sage. A sage. The for conrol poins are: f ( f( f( f(. The poins are obained from he seqence { } by sliding a window of lengh over he seqence from lef o righ his explains he erm ``progressive. -De Boor Algorihm of Degree Three From de Boor algorihm he following cases will be analyzed: [ [. Case: m= The progressive seqence is { } and he conrol poins f ( and. f(. Observe ha hese poins are obained from he seqence { } by sliding a window of lengh over he seqence from lef o righ. Nmber of sages is one. Le s begin wih sraigh lines. Given any on inerval [ for which for R can be wrien niqely a = [- λ λ = λ [ -. And can find ha: λ = - λ =. These seqences rn o o define wo de Boor conrol poins for he crve segmen F( associaed wih he inerval [ if f ( is he polar form of segmen F ( hese de Boor poins are he polar vale. f(=f[(- λ λ =(- λf( λ f( f(= (-λ f( λf(
F ( =F [(- λ λ F ( = (- λ F( λ F(. De Boor algorihm ses wo conrol poins say F( and F(. See fig.. Sbsiion λ = - λ =. gives F(= f( f(. As said already every belong o R can be expressed niqely as a bray cener combinaion of and say ha inerpolaion a = hen F (=f( and a = hen F (=f(. Case: m=. Table. fig. and ineqaliies in he progressive array sill hold The poin f ( is comped as follows see fig.. f( = f( (-λ λ = (-λf(λf( ( f( =(-λ f( λ f( ( f ( = (-λ f( λf ( ( and f( = (-λf( λ f( ( f( = (-λf( λ f( ( f( = (-λf( λ f(. ( Sbsiion of Eqs { and} in ( gaves F(=f( =(-λ(-λ(-λf( [λ(-λ(-λ(-λ(-λλ (-λ(-λλ f( [ λ λ(-λ λ (-λλ λ λ(-λ f( λλλ f(. (7 λ= -λ= λ= λ= -λ= -λ= λ= -λ= λ= -λ= λ= -λ= Sbsie λ λ λ λ λ λ in Eq (7 gives F(=f(= [ { } ( ( ( f( { ( [ [ ( ( [ [ } ( ( ( f( [ [ { ( ( ( [ [ ( ( ( }f( [ { } ( ( ( f( (8 Which is a cbic polynomial in? -Gallier Modified Cbic B-Spline Crves [ [. For a modified cbic B-Spline m= he seqence of (m= consecive nos:
[-m - m - m - m -m - m =[- - which yield seqence of consecive nos ( -i -i i each of lengh where 0 i. These seqence rn o o define de Boor conrol poins for he crve segmen F associaed wih he middle inerval [. if f is he polar form of segmen F hese de Boor poins are he polar vale. Given a no seqence { } and a se of de Boor conrol poins d where d =f(.. m for every sch ha <. For every [ he B-spline crve F ( will ae he form defined by he following : F(= B m ( d= B m ( f(.. m where he B`s are o be defined laer. The polar form f( m of F( is fi( = b (... f(.. m. m m b m is he polar form of B m. The polar form f is inflenced by he m de Boor conrol poins b for [-m. The b m ( m are comped from he recrrence relaion :- b m ( m = m m m m bm( m- m bm( = b m ( m- (9 (0 and = iff = and =0 oherwise is called he Kronecer dela. Ping all = and drop he sbscrip ha ge he sandard recrrence relaion defining he B-splines [de Boor and Cox 78. [ [. Le B(= Now B m m m(= m if [ 0 B m(. B oherwise. m( As a special case he previos wor will be calclaed for cbic spline where m= corresponding o he inerval ( {[ } where = and [0.Now f ( = b0 ( d0 b ( d b ( d b(d. ( For =0 b0 ( = 0 b0 ( 0 b (. From (9 and (0 b0 ( =0 and b ( = b ( b ( b ( =0 and b ( = b ( b (. b ( =0 and b ( =. Also from (9 and (0: b ( =0 b ( =. b ( = b(=
Henceb0(=. If = hen b0(= ( ( ( [. ( A = b ( = b ( b ( b ( = b ( b ( b ( = b ( 0 = b(= b ( =. If = hen b(= ( ( ( [ [ ( ( ( [ [. ( A = b ( = b ( b (. b ( = b ( 0 = b (=. If = hen b(= ( ( ( [ [ ( ( ( [ [. ( A = b ( = b ( 0 b(= If = hen b(= ( ( ( [ ( Sbsiing ( ( ( and ( in ( gives: -
F (= { ( { ( ( [ ( [ ( [ [ ( ( { ( ( ( [ [ ( ( [ } d0 ( [ [ }d ( ( } d [ { }d ( ( ( ( The Eq ( is called a cbic B-Spline. In he case =0 hen [0 and ( =(- - 0. For he special case =0 le (- - 0 =(- - 0 hen [0 and == =. and( becomes: F0 ( ( b0 { } b { } b b (7 Eq (7 called original B-Spline crve dependen on inerval [0. [ [ [. [ [ [ [7. [8. -Developed Cbic B-Spline Crves To consrc he new cbic B-Spline. Tae he case m=. The seqence [m= consecive nos [-m - m - m - m -m - m =[- - yields seqences of consecive nos ( - i -i i each of lengh where 0 i and hese seqences rn o o define de Boor conrol poins for he crve segmen f associaed wih he middle inerval [.. f is he polar form of segmen F. Then he de Boor conrol poins di =fi( - i -i i where i= 0 are given by: d =f0( - - a i=0 d =f( - a i= d =f( a i= d =f( a i=. Observe ha hese poins are obained from he seqence {- - } by sing he new de Boor algorihm for calclaing f ( a each vale of where is given in Table below. From sage f( is given by : f( = (-λf( λf( (8 From sage f( and f( is given by: f( =(-λf( - λf( (9 f( = (-λf( λ f(. (0 From sage f( - f(. and f( are given by: f( - = (-λ f( - - λ f( - ( f( = (-λf( - λ f( ( f( = (-λ f( λf(. ( Sbsiion of Eqs {9 0 and } in (8 gives F=f( =(-λ(-λ(-λ [ f( - - {(-λ(-λλ(-λ(-λ λ (-λ(-λ λ} f( - {λλ(-λλ(-λλ (-λλλ}f( λλ λ f(. ( Sppose f( - - f( - f( f( = d0d d d are conrol poins and eqaion becomes. 7
8 F=f(=(-λ(-λ(-λ d0{(- λ(-λλ(-λ(-λ λ(-λ(-λ λ}d{λλ(-λλ(-λλ (-λλλ}d λλλd. ( Eq ( hé formla of a new cbic B- Spline. Trea he coordinaes of each poin as a wo-componen vecor and sing he symbols d0 d d and d for conrol poins. Le as given as [ [ [0. [. di=(xi yi for i=0 m and di= i i y x The se of poins in parameric form is d (= y( x( λ= -λ= λ = -λ = λ = -λ = λ= -λ = λ = -λ= λ = -λ =. The formla of a new eqaion of cbic B-Spline in ( becomes F(= { ( ( ( [ } d0{ ( ( ( [ [ ( ( ( ( ( ( ( ( ( [ [ } d { ( ( ( [ [ ( ( ( [ [ } d { ( ( ( [ } d. ( For he case = hen [ F (= { ( ( ( [ } d0 { ( ( ( [ [ ( ( ( [ [ } d { ( ( ( [ [ ( ( ( [ [ } d { ( ( ( [ }d.(7 The Eq (7 is idenical wih Eq ( In he case =0 hen [0 and (- - =(- - 0.
For he special case =0 le (- - 0 =(- - 0 hen [0 and == =. and (7 becomes: F0 ( ( d 0 { } d { } d d (8 The Eq (8 is idenical wih Eq (7 To explain he above new formla of B-Spline crve ( he following example is given Example: - Given he following conrol poins: d0=(x0 y0 = 0000 d=(x y = 00 0 d=(x y = 00 0 d=(x y = 0000 d=(x y = 0000 d=(x y = 00 0 d=(x y = 00 0 In he case =0 hen [0 and (- - =(- - 0. For he special case =0 le (- - 0 =(- - 0 hen [0. The following cases will be sdied Case : Taing he special case = 0 =0 and = = and == =. where [0 hen Eq ( redces o original Eq(7. The change of he crve ae only when change he conrol poins. See fig.. Case : The parameer (λ is aen o be increased wih sep differen from ha of he parameer in piecewise or in all piecewise is saring wih = and ending wih =. The vale of λ (i.e. is aen according o he desire of he designer when he wans he design o be changed in exerior manner. This can be seen in fig. he changes oo place wih no change among he conrol poins. Case : The parameer (-λ is aen o be decreased wih sep differen from ha of he parameer in piecewise or in all piecewise is saring wih = and ending wih =. The vale of -λ (i.e. is aen according o he desire of he designer when he wans he design o be changed in inerior manner. This can be seen in fig.. The changes oo place wih no change among he conrol poins. Case : (-λ is aen o be varied wih sep say h. In his case i is fond ha he design can be moved pward wih no need o change any of he conrol poins. See fig.. Case : The parameer - (-λ is aen o be decreased wih sep differen from ha of he parameer is saring wih = and ending wih =. The vale of (-λ (i.e. is aen according o he desire of he designer when he wans he design o be changed in inerior manner. This can be seen in fig. 7. The changes oo place wih no change among he conrol poins. {Eq ( is bil on new mahemaical procedre. A procedre ha can be developed by mahemaicians and designers in he fre o give oher new properies}. Case : The parameer (λ is aen o be increased wih sep differen from ha of he parameer in all piecewise is saring wih = and ending wih =. The vale of λ (i.e. is aen according o he desire of he designer when he wans he design o be changed in exerior manner. This can be seen in fig. 8. The changes oo place wih no change among he conrol poins. Case 7: The parameer (-λ is aen o be decreased wih sep differen from ha 9
of he parameer in all piecewise is saring wih = and ending wih =. The vale of (-λ (i.e. is aen according o he desire of he designer when he wans he design o be changed in inerior manner. This can be seen in fig. 9. The changes oo place wih no change among he conrol poins 7-Conclsions In his wor conclde he following poins: -The developed B-Spline eqaion is based on a mahemaical procedre depending on he linear consrcion of polynomials and following de-casela and de Boor algorihms. This led o a general procedre ha can be sed easily. -A consricion of a modified formla for B-Spline crve has been achieved hrogh a procedre following de-boor algorihm. The procedre has been developed in a seqenial and mahemaical way as i is obvios in formla (. I has he following advanages: a-the modified linear mahemaical consrcion of he eqaion gives he Designer move choice o reach and modify any segmen of he design. b-the modified formla wors on mch more flexible real vales of he parameer ha is on a seqence of he form 0 raher han he special familiar frame [0. c-the designer has advanage of covoln and modifying all or par of he design hrogh he vales of he parameer wiho changing any of he conrol poins. 8-Reference [ Gallier Jean "Crves and Srfaces in Geomeric Modeling Theory and Algorihms" Morgan Kafmann pblishers. 000. [ Jaber A. M "Modified Crves Mahemaical Models." Ph D hesis. Universiy of Technology. 00. [ Fax I D "Compaional Geomery for Design and manfacred" Ellis Hood ld. 98. [ Manning J.R" Coniniy Condiions for Spline Crves" Comper J. Vol. 7 No. 97 pp. 8-8. [ Goodman T.N" Properies of B- Spline" J. Approx. Theory J. Vol. No. Jne 98 pp. -. [ Lengyel E "Mahemaics for D Gage Programming and Commer Graphics" Charles River Medal. Inc. 00. [7 Rice J.R. "Nmerical Mehods Sofware. And Analysis" Comper Aided Geomeric Design. 98. [8 Gerald C. F and Whealey P. O. "Applied Nmerical Analysis" Addison Wesly. 999. [9 Hill F. S Jr "Comper Graphics Using Open GL" Prenice Hall. 00. [0 Bss S. R. "-D Comper Graphics A Mahemaical Inrodcion wih Open GL" Pblished in Prin Foma. 00. [ Alan W ``D Comper Graphics`` Addison Wesley Company Inc.000. 0