Luận án Nhận dạng chữ viết bằng đường cong B_spline

NHẬN DẠNG CHỮ VIẾT BẰNG ĐƯỜNG CONG B_SPLINE NGUYỄN BÁ TOÀN Trang nhan đề Mục lục Chương 0: Mục tiêu của luận văn. Chương 1: Lý thuyết toán về đường cong B - spline. Chương 2: Phương pháp nhận dạng & các thuật toán. Tài liệu tham khảo

pdf54 trang | Chia sẻ: maiphuongtl | Lượt xem: 1747 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Luận án Nhận dạng chữ viết bằng đường cong B_spline, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
i homogeneous(ni'c phepchilu phdlcanh) nghiaIA khi tamu6nbiend6i du'~gcongB-splinetachic~nthlfchi~nbiln d6id6tr~ncaedit1'mkiem80a1 cuadu'<1ngcongd6. 1.1JPhepquayquanhg6ctoado 0. y,y x,x* VectorP vap* c6d~g P=[x y]=[rcos+rsin+ ] P*=[x* y*]=[r cos(++e)r sin(++B)] khaitrieRbit1'uth1i'clu'Qngiactrongp* surra P*=[x*y*]=[x.cose-y.sine x.sine +y.cose] suyracongth1i'cd6i~ dQ x*=x.cose -y.sine y*=x.sine +y.cose haydu'did~gmatnjn . [X*]=[X][Tl [ COSO sinO ] [x* y*]=[xy] .- smO cosO vdi[T]= [ CO~O SinO ] 1A matnjnquayquanhg6c0(0,0)vdig6ce-smO cosO matnjnT IAIDamjn~e giaodod6phepbi& d6ingu'Qc(phepquayngu'Qcvdi hu'dng.ren)]a 13 rrr1=rr]T= [ ~B8mB - SinB ]cosB Bo~nehu'dngtrlnhconsandtingdequaye~ediemIdemso~t(tti'equaydu'lmg eongB-spline) /JPHEP QUAY QUANHGOCTOA DO 1******************************/ void Quay(DIEM*B) 1******************************/ {floatT[3][3]; floatz=3.141618/6; T[1][1]=cos(z);T[1][2]=sin(z); T[2][1]=-sin(z);T[2][2]=cos(z); (*B).x=(*B).x*T[1][1]+(*B).y*T[2][1]; (*B).y=(*B).x*T[1][2]+(*B).y*T[2][2]; } VdiB 13vectorki~msoatdu'<jckhaibaonhu'13biln chung z 13g6cquay 1.2IPhepJ1{yd6ixungquatruetoado PhepdOlxungquatruehoanhOxxaedjnhbdima~n rrJ= [ 1 0 ]0 -1 Phepd6ixungquatruetungOyx~edtnhbdima~n [ -1 0 ]rr]= 0 1 Phepddix'dngquadu'CJngph4ngiaethli'OO(ty=xx~cdjnhbdiIDatDjn m=[;~] PhepddiX1fugquadu'CJngphangiacthli'haiy=-xxacdjnhbdiIDatDjn rrJ= [ O -1 ]-1 0 to~dQbiln d6itheecongthaesan [X*]=[X]ff]hay[x* y* ]=[x y][11 PhepIa'yddixungc6th~dUngehovi~cvede kYt1fc6tinhddiXlingnhu' A ,M JI"T"Y,O"U,W 13ddixU'agqua1:nJ.etJdngd1i'ngcOntrl}.enm nganggdm de kY t1fX~,B,xJ),C~,. the'OOungcaetrl}.ctJdngd1i'ngvaohmngangit 14 .reDc6khikhoogphai]A~c OXhayoy.Dod6c~ cocdDgthacxacdjnhphep Ily d6ixungquamQt~c bttkYmataxexetsan. 1.3/Phepbie'nd6iti Ie hayph6ngtothunho(scale) ThU'<'1ngkhixac~ cacdi~mki~msoatcuacacfontchU'tachQnto~dQ cuachUng]AsO'nguyentrongd vudng3x3.cact~ dQnaydt 000sov~idQ phangiaimanhlnh,dethty dU'Qcddthttrenmanh1nhtaphaiph6ngtocac di~mki~msoatleu50Ifut(utcph6ngfontchfi') matrin cuaphepph6ng]A rrJ=[: :] vdidxdQph6ngd~theo~c hoanh dy]AdQph6ngd~theo~c tung N6unu6naM 1&hooanhg6cthltaphaiIty dx=dy>l N6unu6niinhnhohOOaM g6cthltaphaiIly dx=dy<1 N6udx<lthliinhsethou~i N6udy<lthlanhseIUnxu6ng V~yngoaivi~cph6ngtothunhaphepbie'nd6iscaletrenconchopheptataQ ranhfi'ngfontchfi'g~ymacao'hay'm~pmaIUn' //Phepbie'nd6i19It$ 1******************************/ void Scale(DIEM *B) 1******************************/ {floatT[3][3]; T[1][1]=dx;T[1][2]=0; T[2][1]=O;T[2][2]=dy; (*B).x=(*B).x*T[l][1]+(*B).y*T[2][1]; (*B).y=(*B).x*T[l][2]+(*B).y*T[2][2]; } 1.4/Phepbie'nd6ituye'ntinhvat08doHomogeneous T~ dQHomogeneoscuavector[x y]]A [x' y' h] vdi x'=bx;y'=hyvah]A sO'th1fcv~yto~dQhomogeneouscuamQtvector[x y] la [hx hy h]nghi3lan6khdngduynhttva13la mQt~ph<;1pcacvector cUngphU'OOgtrongkhonggian3D.B~cbit$tkhih=l~ dQhomogeneousc6 d~g [x Y 1] n6th1t<1ngdUngdebiin thtvector[x y] trongm~tph&ngxoy (haycOngQi13m~tph&ngv4tly) Phepbie'nd6ituye'ntinht6ngquatc6d~g x*=ax+cy+m y*=bx+dy+n haydu'did~gmat$1 [X*]=[X][T] 15 [a b 0 J Vdirr] Xacdinhbdimat$1sanrr]=c d 0 m n 1 *Dijebi~tkhia=d=l;c=b=Otac6phepbie'nd6iQnhtie'n [x* y* l]=[xy l]rr] [ 1 0 0 ] vdi rr]= 0 1 0 J.amat$1 cui pheptinhtie'nveetd[x y1tbeophu'dng m n 1 I-{-m,-n} V~ymatrcjntinhtie'ntbeovector{m.n}J.a [ 1 0 0 ] rr]= 0 1 0 -m - n 1 1.5/Phe uav uanh1diim b(t M E>u'<;1ctbu'~hi~nbbg cachtichcui caephepbie'nd6isan:Phepqnhtie'n diim M v~gocto~dQ;Phepquayquanhg6c0vacuOlcnngla $h tie'ntrd~i diim M [ 1 0 0 ] [ cosO [x* y* I]=[x Y 1] 0 1 0 -sinO -m -n 1 0 sinO 0 ] [ I 0 0 ] cosO 0 0 1 0 0 1 m n 1 khaitriin tichmatrcjn~n cosO [x* y* I]=[xY I] I-sinO { -m(~O-l) }+nsmO sinO 0 cosO 0 { -n(~O-l) } 1 -msmO 1******************************/ voidQuay_quanh_M(DIEM*B) 1******************************/ l floatR[4][4]; floatz=3.14161816; 16 DIEM M; M.x=l;M.y=O; R[l][1]=cos(z);R[1][2]=sin(z);R[1][3]=0; R[2][1]=-sin(z);R[2][2]=cos(z);R[2][3]=0; R[3][1]=-M.y*(cos(z)-l)+M.x*sin(z);R[3][2]=-M.x*(cos(z)-l)- M.y*sin(z);R[3][3]=1; (*B).x=(*B).x*R[1][l]+(*B).y*R[2][1]+R[3][1]; (*B).y=(*B).x*R[1][2]+(*B).y*R[2][2]+R[3][2]; } Mudn18mchochii'nghiengfac6th~dUngphu'dngpMpsan; -DUngphepbie'nd6iScalelAmchochii'thonl;p -QuayIDQtg6cRhotheochi~umudnnghieng -ChInhcacdi~mki~m80atn~mhendttdi~c hoanhchon~IDtrentrv-choanh - Ve ddthihamxacdpmbdicacdi~mki~m80atren 1.6LPhe dOlxun ua du'<snth!n b{t . C J>B 2 B ~ A C Ch!ngh~n13IDu6nlly dOlxdhgcui tamgiacABC quadtt<sngtbAng(d)th1 pheplly dOixungnaylAtichcui cacphepbie'nd6i. -TPili tie'ndu'~g(d)dQCtheotrv-ctung2ddnV1d~dtt<sng(d)diquagdC0 -Quayd11'esng(d)IDQtg6c9d~cho( d)trUngvdiox -Phepl!y ddJ.xungquatrv-cox -Sand6quayngu'Qcdttesng(d)mQtg6c..evacuOicnnglA phepQnhtie'ndu'a (d)v~vi tricd GQirr] lAphepQnhtie'n [R]:lAphepquay [R'}lAphepIa'ydOixungquatrv-coxhayoy phepl!y dOixungquadtt<sngtMngb{tkYchobdi [T]= {T' ] [R] [R'] [R r 1[T'r 1 vdicongth1fcbie'nd6i [x* y* l]=[x y 1][T] 17 vi d~phepquaytamgiacABC quanhdtt()ng(d)y=l/2(x+4)c6matnjnbitn d6ilA: vectorT~ tie'nl={O,-2} g6cquayquanhg6ce=-arctg(lll) mamj,nphepbie'nd6i1A [ 1 0 o J[ 2/J5 -1/$ 0 ] [ 1 0 0 ] ffJ= 0 1 0 11,fS 2I,fS 0 0 - lOx 0-2 1 0 0 1 0 0 1 [ 2/.J5 1/J5 0 ][ 1 0 0 ] x -1/ J5 '2/-150 0 1 0 0 0 1021 [ 3/5 4/5 0 ] =4/5 -3/5 0 -8/5 16/5 1 Ne'uchoA[2 4 1]; B[4 6 1];C[2 6 1] lacaevectortrongto~dQ homogeneous giA*,B*,C*Iaanhcui!tamgiacABC quaphepquay tac6to~dQcuaA*,B*,C*Ia [ 2 4 1 ][ 3/5 4/5 0 ] [ 14/5 12/5 1 ) 4 6 1 4/5 -3/5 0 =28/5 14/5 1 2 6 1 -8/5 16/5 1 22/5 6/5 1 2.DUONG CONG BAC BA ~ Phu'dng1rlnhtham86cui du'CYngcongtham86B4cbac6d~g 4 P(I)= LB/-i 11~I ~I']. (2-1) i=1 trongd6Bi]Ac'c vectortrongkh6nggian:Bi=(Bix,Biy,Biz) Do d6P(t)cfing]Avectortrongkhonggian:P(t)=(x(t),y(t),z(t» c'c thanhpMncui vectorP(t)]A: 4 x(t)=LBj;/-1 i=1 4 y(t) =LB. t;-111 i=1 t1~ t ~ t1, 4 z(t)=LBi,/-i i=1 C'c hc$s6Bi du<;1cx' dpmquac'c di~ukic$nbi~n Vi€t~ (2-1)P(t)=B1+Bzt+B3r+B4et1~~tz (2-2) P'2 P'l P itt1 IDnh2-5Du'bngcongB4cbatr~nmQtd~ GQiPI, P2.1Avector~haid4ucui dU'C1ngcong1iDgvdi t=tl,t=tz vagQiPI' va P2']Avectord~ohamcuan6 tac6 4 P'(t)=(x'(t),y'(t),z'(t»=!:B;(i -1)t;-2 i=1 P'(t)= ~+2B3t+3B.i tl~~ (2-4) Tac6d1~giadinhmakhoogJammittinht6ngq~tdug tl=Ovacaedi~ukic$n bi~nchota (2-3) P(O)=P1 P(t2)=PZ (2-5) 19 P'(O)=P1' P2'(t2)=P2' Ta-(2-4) suyra P(O)=B1 P'(O)=B2 P(t2)=B1+B2t2+B3t2+B4t23 P'(t2)=B2+2B3t2+3B4t22 ktt hQpvdicaedi~uki~neM (2-5)fasuyra P1-B1 P1'=~ B =3(P2- in 2P\ - P\ (2-7a) 3 t 22 t2 t,. B - 2(~-Pz)- P't+P'2 4- t l t/ t,.2 (2-7b) cae giatIi Bl , B2,B3,B4xaed.jnhdu'CSngeongB~ebatrendo~n[tl, t2] thaythe'caetIi nayvaophu'dngtrlnhP(t)fae6phu'dngtrlnhdu'cmgB~eba P( ' )--P P' r3(P2-li) 2P\ P2 ] 2 [2(~-~) Pi P2 ] J (28)t- 1+ 1H 2 t + 3 l+-zt - t 2 12 t2 t 2 t2 t2 Phu'dngtrinhtrenchimdixaed.jnhdu'tmgeongttenmQtdo~n;Ne'udu'Ongeong e6nhi~ud~ thitlmphu'dngttinhthamso'eM n6nhu'the'nao? Giss1i'fae~nfunphu'dngtrlnhtham86eM du'OngeongB~cbattenhaido~n [t},t2]va [t2,13] Hlnh(2-6)Haicungcui d10ngcongb4cba p'J P'l 20 Theo~n 13chic~ tbnvector~p tuy6nP'zsand6'p d1p1g(2-8)chotUng d~ vally tdnghaiham~n haido;pld6IAxong;V~yvectorti6ptuy6nP'z du'<jctlmnhu'th6nao? Tn-(2-1)d~ohamhaiv6dln c(p213c6 .. P'(t)= L(i-IXi-2)B/-3 O~t~t1 (2-9) ;:1 chli'9dIlg dodi~ugiiictplhd~n tham86c~y ttongkhoang0<-1Stz ~ t=tz13c6 P"(tz) =6B4tz+2B) dAytham86cui dO;plthU'haiJa 0<-1St) d~ohamc(phaicui du'~gconItrendo;plnay~t=OIA Q"(O)=2C3(Q(t)=Cr+yt+c3f+CiJaphu'dngtrlnhdu'&gconiB~cbatren d~ thahai) E>~du'<1ngcongdu'<jctrdn~ diimn6ldi~uki~nsandu'<jcthoa P" (tz)=Q"(0) 6B4tz+2B3=2C3 k6th<Jpvdi (2-7)13c6 6t [ 2(~-lD PI +P'1]+2(3(~-lD 2P1- P1 ] 2 t 13 t/ t11 t 11 t1 ~ =2(3(~-P1) 2P1- P3] tl t, t, nhanhaiv6chot1t2r6initgQn13dueJe t~'1+2(t3+t2)P'z+tzP'3=~[tz2(P3-PZ)+t3z(PZ-Pl)(2-10) ~t1 tU'd§y13c6thi tfnhp'zvanhu'v~yphu'dngtrinhdu'&gcongB~cba~n hai do~ du'<jcUrnnlu 13bi6t3 vectorVttri PI'p2 'p3va2vectortilp tny6ndju vacudiP'1vap'3 Tn-k6tquanay13c6th~tdngqut he' chovic$ctlmphu'dngtrlnhtham86cui du'&gcongxacdpthbilln diim vttri Pi vahaivectorti6ptny6n~ haiddu cui du'<1ngcongP'I P'n V~idi~uki~ndu'&gcongphciithuQcl~ c! ~ cacdiEmndi 21 Pt<t) Pt+2 P't+2 Pt.- P'k+l 1t+l 1t IDnh2-7 Bu'CJngeongB~cbaquandi~m Phu'dngtrlnhdu'CJngeongtaido~ th1i'k vathltk+lJA P() -P P' [3(Pktt-Pt) 2P't P'k+l]..2 [2(lt-Pktt) Pt P'k+1] 3t t - t+ tt+ 1 - - - - L + 3 1 +--z t t k+l tk+l tk+l t k+l tM tk+l P ( )-P P' [3(Pk+1- P/c+1)2P'M P'k+1]..2 [2(PM- Pk+1) P'M P'k+1]..3k+l t - t+l+ k+lt+ 1 --- L + 3 --,;+-z -r- t k+1 tk+1 tk+1 t k+1 tk+1 tk+2 thams6 eM d~n thti'k lA<-~1t+lvado~ thti'k+llA 05t<1t+2 t1Ydi~uki~ntrdntaicaedi~mnfflP" t(1t+l)=P"(O) 1t+2P't+2{1t+l1t+2)P,k+l+1t+lP't+2- 3 [1t+12(Pt+2-Pt+l}+1t+22(pt+l-P0(2-13) tk+ltk+2 Xp d~g eho2~-1 tadu'~n-2phu'dngtrlnhxacdpmP'k matnjnk€t quae6d~g ~ 2(i:t+~) tz 0 0 t.. 2(~+t..) ~ 0 0 t, 2(t..+I,) 0 t.. 0 x 0 I" 2(1"+ 11M) tIM 22 P'1 P'1 3 1 1 -{(IZ (~- PZ)+;(P1- p.)} t,,~ 3 1 1 -{(~ (1>..-~)+I. (~-P1)) ~t. -'. P'" 3 z Z -{(tll-l (PII-P"...l)+I" (P,ri-Plt-z)} tll-1t" Hayyilt gQnbP [M.][p']=[R] Trongh~~n ta c6n-2phu'dng1rlnhchon vectortilp tuyln ,dod6matcJn [M.]khdngphai13ma1Iinvndngviv~Ykhdngth~tlmma1Iinkh8nghtch dod6chu'ath~suydu'<;kmatcJn[P'] giadinhtabitthaivectortilp tnyln~ haid4uP'l vaP'2 khity h~~n vilt ~i r~ 2{~ +t,) 0 '. 0 0 t" 0 2(;+t.) ; t5 2(t.+t5) 0 t. 0 x 0 'II 2(tll + '11-1) 0 ',,-1 10 23 P't 1'\ PI 3 1 1 -{(t1 (~- 1'1)+;(P1- p,.)}~~ 3 1 1 -{(~ (1'.- ~)+t4(~- Pz)} ~/.. -. . 1",. 3 1 1 -{(t"-i (1',.- PII-l)+ I,. (PfI"i- P1I-1)} tfl-it,.. 1",. e6d~g [M][P']={R] [M] lAmatr;jnvu&gkhiinghi.ehtU'd6tamyra [p']=[Mr1[R] . Tft'dAycaevectorP't diidu'c;k:hilt n~ntae6thi xaedPilicaeh~s6Bi nhu'(2- 6) -(2-11) Blt=Pt B2t=P't 3(l'k+l- P.D 21"c 1"k+1 lJu:= 1 --- t k+{ tkit tk+1 B - 2(Pi- Pkit) Pc +1"kit4k- t 3 I 1 t 1kit k+l k+1 Cud!cftngphu'dngtrlnhthams6cui do~th1fk ]A .. Pc(t) =~Bl1-tH O~t~tk+1l~k~ n-l (2-18) i=I viEtbPphu'dngtlnhtren 24 1 0 0 0 Bu: 0 1 0 0 Pk B -3 3 -2 -1 Pk+{I [B]=I B1Jr = t1k+1t1kit -- (2-17) 3k t k+l tk+1 Pc B4t 2 -2 1 1 Pk+1-- fk+1 fk+1 t1k+{ t1k+1 P\ 1'\ 1"1 3 1 1 -{(t1 (~- 1'1)+;(1'1-~)} t,.~ 3 2 1 -,-{(~ (P.- ~)+14(~- Pl)} ~t4 -'. L1"n 3 1 1 -{(tn-l. (1'n-Pn-I)+ln (Pn-I-Pn-l)) INt,.. 1",. c6d~g [M][P']=(R] [M]1Amatnjnvudngkhiinghi.chtU'd6tasuyra [P']=[Mr1[R] Tft'dAycaevectorP'kdadu'Qchilt n~ntac6th~xacd.jnhcach~8dBinhu'(2- 6)-(2-11) B1~Pk B2k=P'k 3(1'i+l-1'k) 21"k 1"i+l1.9.- ---- 3k- t Cttl tkit tlc+1 B - 2(1'k- Pkit) 1"k +1"kti4k- 1 3 t 1 t 1kit i+l k+! Cudicftngphu'dngtrlnhtham86cd do~th1fk 18 .. Pk(t)=LBl1-t-l. 0~t~tlc+1l~ k ~n-l (2-18) i=t yilt ~ phu'dngtlnbtren 24 1 0 0 0 J: 0 1 0 0 1'k B1Jc -3 3 -2 -1 1'k+1I (2-17)[B]=I =-- -- BJIt: tlk+! tlkit I k+l tk+! 1"k B4J: 2 -2 1 1 1"k+J.-- t'k+! t'k+! t1kit 11ktt ~P~t)=[1t r f ] B2Jc B3Ic B41t: thay(2-17)vao13e6 Pc PM P~'t)=[Fl('t) F2('t)FJ('t) F4('t)~P It: PM D<-'t<-l; ISkSn-I (2-20) vdi 't =(tItt+l) F1k('t)-2~-3~+1 F2~'t)=-2't3+3~ F3~'t)='t(~-2't+l)!t+l F4~'t)='t(~-'t)tt+l cae hamnay du'~gQilAcaehamtrQnhaycaehamtrQngs6 vie'tdu'did~ngmatnjn13e6 Pk('t)=[F][G] vdi [F] =[F1('t)Fz('t) F3('t)F4('t)] [G]T=[Pk Pk+lP' k P\+l ] (2-21) (2-22) (2-23) (2-24) Ngu'CSitathu'CSngehQncaethamso'lAdQdaicaeeunggimIcaedi~mPi vid~ehoP1[0 0] ;P2[l 1];P3[2 -I] ;P4[3 0] vahaivectortie'ptuye'ntaihaid~uP'1[1 1];P'4[1 1] TinhtQeuaham~ t =113theotUngd~ Giii tinhtIi eM !hamso' 12=1P zP 1 I=/i t3=1P~zl=.JS 4=1P~31=J2 Tu-(2-15)suyra P1 f l 1 P2 0.50 -014 P3 - \ 0.50 -014 P4 1 1 Tinh caehamtrQntU'(2-21) F1(II3)=O.74 F2(II3)=O.25 25 F3(113)=O.21 F4(113)=0.105 Tq CU3hamtatt =113 P(t)=[F][G] ~ do~ndl1f118 P(ll3)=[O.460.48] ~ do~ thtf2Ja P(1I3)=[1.340.45] ~ do~nthtf3Ja P(113)=[2.26-0.87] 2.2Chufn hoaidtiClnszCOIUlDAcba Be d~tinhtOO11ngu'Cfi18thU'CJngchulnboatham56v~do~ [O~l]cua du'CJngcongB4cba Khi !y c'c hamtrQnc6d~g F1(t)-2f-3f+l F2(t)=-2f+3f F3(t)=t(f-2t+l) F4(t)-t(f-t) vi~'tdu'did~ngIDatrcjn f-: [F]=[f][N]=[e r t 1]1 l~ (2-25a) -2 1 1 3 -2 -1 0 1 0 0 0 0 (2-26) phu'dng1rlnhmatrcjncuadu'CJngcongB4c ba P(t)=[F][G]=ff][N][G] (2-27) matrcjnG thayd6imytheocungPi ,P 1+1ma18c&nDC dPiliphu'dngtrlnh Bbg thtfc(2-15)dUngdetfnhcaevectortie'pmye'ntrOth8nh 26 10 1"1 P'1 1 4 1 0 1"" 3{( - P,,)+(P"- P.)} 0 1 4 1 0 . 3{(P.-)+(-J;)} I l I (2-28) . . o' ; 4 1 : 1 (P.-p...)+(P...-p.)}. . 0 1"" P'" 2-3.Di& ki~ khac haido cwieM 2-3-1.EM xod!1:..f1l4.4ubngcongo E>~bi~udi~ndQxoAncuadu'<)ngcongngu'lfitarangbuQcd,o hamclp 2 ~ haid~ucui du'Cblgcongd6phii thaimQtdit1uki~nnaGd6.NEud,o ham ctp 2naybhg khoogtan6id1tCJngcongt1fnhii!nhayt1fdo 4 tU"(2-9)tae6P"(t) =L(i-lXi-2)B/-3 O~t ~tk+l i=I. tp khoing d~uti~n[0,t2]khi t=Otac6 1"'(0)=2B3=2(3(~~P.)- 21"1- 1"1)=0 Lz. t']. t" ~p xEp~ 1"2 3 1"1+2=2t (1'2-}D']. Dov~yhangdiillti~ncui matnjn[M]va[R]sela rl1l2 o. .Vl1=r~(l'z-p,)1 T~idInheuOlcui do~ CUOl1=tn(k=n-l) P" (tn)=2B3+6B-ttn=O dUng(2-17)tae6 6 21"1M 1"-(1' -1' )+-+4-=0t2 "-1,, t I11 11 11 (2-30) 6 21""-{+41",,=-(1',,-1'1I-{)(2-31) 111 hangCUolcui matnjn[M]va[R]13(xem(2-15» L. . 0 2 4JLP.J=l ~(P. - P )J ----- vi dt}.(2-2)Bu'Cblgcongb~cba Cho 3 vectorvi trf PI[O0] ; P2[12] ; P3[3 2] Xc1cdinhdU'CblgcongB4c badi quanhungdi~mnayvdi dit1uki~ndU'CblgcongdU'Qctq.dod haid~u Giii: Ta xlp xi thams6bhg dQdiUcungtrenmOid~ h=IP2PII=J11+21=JS t3=IP:sP21=2 DUngdit1uki~n(2-30)va (2-31)chodit1uki~nt1fdod haid~u tU"(2-15)LM][P']=[R] 7:l [1 0.5 0 I p'I1 [ 0.6 13 ] 2 8.4 22 P'1 J =93 53 0 2 4 p') 6 0 [ P'I ] [ 03 11 ] P'1= 0.7 0.4 p') U -0.2 tU'(2-21)tasuytahamtrQnF [F]t=113=[0.70.25 0.3 -0.1] phu'dngtrlnhdu'~gtongP(9=[F][G] 0 0 1 2 P(II3)= [0.7 0.25 0.3 -0.1] 03 11 0.7 0.4 P(113)=[0.270.82] 2-3-2.DuiJngcongKin(Cyclkl Du'~ngtong Cyclic Ia du'C1ngtong kin haydu'C1ngtong du'<jc~p bP tren mQtkhoangE>i~uki~ tho dttC1ngtongcyclicIa~ haid~uCM du'~ngcongc~c vectorti€p tuy€n vavectorxoAntnlngnhau P' I(O)=P'n(fn) (2-32) P" I(O)=P"n(tn)(2-33) tU'(2-4)va (2-16) P'(t)=B2+2B3t+3B4r=>P'(0)=B2=P'1 P'(tn)=P'n-l nenP' I(O)-P'n(tn)=P'l -P' =21(3(Pn- Pn-I) 2P'n-I- P n] n-l n tln In t" +3t :t[2(Pn-l-Pn) +P'n-I+p'~](2-34) n t3" t1" t1n tu'dngtit(2-33)cho 3(Pz-1D 2P'1 P:t 3(P"-Pn-I) 2P'n-I P'n ~ tl I-- t ]=2 (tl _I --t ]1 1 1 " /I" +61[2(Pn-I-P")+P'n-I+p,,]. " t3" t1n t1n (2-35) nMnhaiV€ CM(2-35)chotu~i Jly (2-34)~ cho(2-35) 28 p' -p' - -tn'X3(~-lD - 2Ft - P'2]=312(2{Pn-t-Pn}+P'n-t+p'n] 1 n 1 ~ (22 12 (2 " tJ n t2" (2n 6t 2( 2{Pn-tPn) P'n-t p'n ]- +-+-" tJn i2n t2" doP' l=P'n si{px€p ~i d4ngtirltc~n tac6 In In In 3 (236)2{1+- )P't+-P'2+P'n-t=3-Z(P2- lD- -(P n-t- P,,) -~ ~ ~ ~ Vectorti€p tuy€n~ c~cdi€m DOlb~ntrongcn3du'~gcongcfingdu'<;1ctinh nhu'(2-15)tuynhi~ndodi~nki~n(p'I-P' J c'c vectornaykh&g condQc14p nhannua;Matrcjn[M] b§ygiC1c6 nchthu'(fc(n-1)x(n-l)vdihangd~nc6hc$86 ~ bdi(2-36) t 2(1+..!L) 12 tn 12 2{/2+13} 0 t, 12 P'1 P'2 3t 3 . -t(P2 -lD+-(Pn-t-Pn) t2 In 3 2 2 -{(~ (~- P2)+I:,(P2- l't)} t21:, -, . (2-37) P'n-t 3 2 2 -{(In-! (Pn- 1>,,-t)+In (P,,-t- Pn-z)} t,,-t/n 29 1 o . 0 I x . . I 0 tn 2{tn+tn-!) tn-t 3.DUlING CONGBEZIER Trongph~ !rentadi bm b~cthiet14pphu'dDgtrlnhd11'CJngconI di quan di~mchotnt& ,c6nhi~uugd1plgtrongIcYthti4tbbg ph11'dngpMpnaych1ing d~cbi~ thichhQpd~mdt3du'CJngconI vi d~0011'trongcoognghc$thietkl cmmvathanmaybay,thietkehJnbdWigxehdi.Tnynhi~nph11'dngphapnay c6mQtnh11'cjcdi~m]Aphii bitttnt&hu'Ongvade>1&1cuavectortieptuyen~ haid~ucwidu'CJngcongvi~cnaykhdngd~dangtroDgthtfcfl. MQtph11'dngphapkhctcd~mdtl d11'CJngconI vam~tcongdoBezierd~ xu'&1gsand6d11'cjcForrest,GordonvaRiesenfeldPMt tri~nvabi~udi~nket quadu'<Jid~ngcdsotOOnhQCd11atr~nhamBernsteinhayOOifnghamdailiac tu'dng du'dng . Bai toctnd~trad d§y]A:VdimQtd11'CJngcongchotnt& matach11'axctcdPili du'cjcdngth1i'chaycdngth1i'crlt Ph1i'c~p,vat4pcctcdi~mpMn bi~tBo , Bl ,B2, ,Bnmdtl hinhdctngcw1du'CJngcongnaylamtht!naod~x§yd1fngdu'cjc du'CJngcongband~uvdidQchinhxacnaod6. ~I loonCasteiaudlvedlliingconglJerier. Bl B1O(t) B2 B2o(t) B3 Th~t tomnaydva~n t4pcacdi~mchotntc1cd~timrahamvector II P(t)=LB,JII,j(t) O~t~l i=O . t]Athamsf)thuQc[0,1];ac diemBi eR2 gQi]Acaediemkiemsoat.Lacnay d11'bngcongph-q.thuQcvaot4pcaediemkiemsootn~nkhicaedMmnayiliay d6idu'Ongcongc11ngthayd6itheo. Chon+l diemBo, Bl .B2, ,Bn,BhngphttdngphapnQisuytu'dngtit . lingvdi m6ite[O,l]tasetlmdu'cjcmQtgiatQB(t)quan bu'dc.Trongd6 cctc di~md bu'dcthd'rdu'cjc~oranYcctcdiemdbu'dcth1i'r-ltheophu'dngtrlnhsan B{(t)=(l-t)Btl(t) +tB~lr-l(t) vdir=l..n, i=O...n-r,Bjo=Bi 30 ae di~m~o rad b1t<keuOlenngBoO(t)d1t<JcgQi13:d1t&geongBeziercwi caedi~mBo,Bl ,Bz, ,Bn va13kY hi~uJa hamB(t) va dU'<Jcvie'thP 13: It P(t)= LB,JIt)t) 0 =:;t =:;1 k=O (3-62) trongd6In,(t>={:)(1- ti' (3~3) ( n ) n' Va = : i i!(n-i)! (3-64) Vjd~: Khi n=2E>u'i1ngcongBezierxaedjnhbdi3 di~mBo,Bl ,Bz P(t)=(1-t)2Bo+2t(1-t)B1+rB2 Khi n=3Bu'&g congBezierxaedjnhbdi4 di~mBo, Bl ,BZ,B3 (goi13d1t(Jng congCubic -b4cba) P(t)=(1-t)3Bo+3t(I-t)2Bl +3r(1-t)B2+r B3 Thongthu'csngs61u<;Sngcaedi~mki~msoatc6th~Ja myy ,mynhi~ndi~unay doihoitinhtoanph1fe~pkhiJamvi~cvdicaehamdathacb4ecaD.ChUng13 khAeph~edi~unaybhngnh4nxet.MQtdu'i1ngcongphae~pbaagi~cfingc6 th~gheptU'nhfi'ngcungWe nhau, dod6tr~n bungcungconnaychUng13c6 th~x~ydvDgdu'OngcongBezierc6b4cOOahOO. Dtri1ngcongBezierc6mQts6tinheMtJa: *HamcdsaIn,i13hams6th11Cvachinh13hamtrQnth1i'i *Dtri1ngcongBezierP(t) luaudi quadit!md~uva dit!meuOl.Hoond'atie'p tuye'ntaihaidit!md~uvaeuOlthlnllm.rendu'(JngttdngnOldit!md6vdidit!m ki~m8031ke'n6. Dod6dt!c6du'<Jcdu'&gcong1rdn~ caedit!mndi13chic~ d~tcaedit!mkit!m~t saDchodiemtnt&vasandi~mnOlttdnghang. *B4ccui dath1fcIn,i(t)dinhnp du'Ongcongmanbehoos6dit!mkit!m8O3t 1doovi *E>u'<1n.gcongph~thuQcvaodath1fcki~m8O3t *E>u'<1n.gcongBezier IRonnh trongbaa16icui datfntcki~msoat *E>u'iJDgcongbit bi6nvdi caephepbi6nd6iaffine *Vdi mQithamsO'ttrongd~ [0,1]13c6 /I LJ It)t)=1i=O 31 Tft'(3-62)dtn (3-64) J (0)=n!(IXI-0r~ =1"'p nl n!(O)'(Oyr-" J(O)= =0"'o! nl i=O i~O vi v4yP(O)=BoIn,o(O)-Bodod6 di&t dauti~n~n du'CSngcongBezierth1trUng vdidiim kiim soatthanh&i Tu'dngOfdanhgia~ diimcudit=1 n!(1)"'(0)-J (1)= =1 i=n "',II n!(1) n!. . J ,i(l)= tl(I-1t-s=0 i~n'" i!(n-i)1 vi v4yP(l )=B.Jn,n(l)=Bo dod6diim cudicftng~n du'CSngcongBezierthltnlngvdidiim cudicmida thti'ckiim soot IDnh (3-25)f)u'(JngcongBeziervadagicicki~msootcuan6 B} B2 B3 H.J'huong trlnh1M"tin eM dlibn,eon,1k1kr. Phttdng1rlnhBezierc6thi biiudi!ndttdid~gmattinnhtt(3-27)va(3- 44)nghii]AP(t)=(T][N][G]=[F][G} vdi[F]=[JD,OIn.! In.2 In,n}va[G]T=lBoB1 BJT MQts6d~gmattin vdib4ctM'pdu'<;1cqnantfunnhu'. Bathackiim sootdPilinghiiib~g4diim(n=3)kbily du'&lgcongb4c3 Hezierc6d~g 32 Bo P(t)=[(I-t)33t(I-t)2 3f(1-t) r] I B,. B']. ..B3 gamc'c h~s6cui tham86tadu'<;1c -1 3 -3 1 B0 P(t)=ff][N][G]=[rr t 1 ]I 3 -6 3 0 B,.-3 3 0 0 B7. 1 0 0 0 B3 (3-68) tu.'dng111vdi n=413c6 1 -4 6 -4 1 Bo -4 12 -12 4 0 B. P(t)=ff][N][G]=[t4 r r t 1 ] I 6 -12 6 0 0 !lzI (3-69) -4 -4 0 0 0 B, . 1 0 0 0 0 B~ CohenvaRiesenfelddi chttngnrinhtrongt.m'<Jngh<;1ptdngquat 13c6 p(t)=rr][Nl[G] vdi [T]=[(I (1-1 ... t 1] (:1:)-1)" (:I:=~)-I)~' ( nln )-I)n-t (nln-l )-lt-Z0 n-l 0 n-2 ( nln- n')... ~-Itn n-nl 0 [N]='. ( n l n ) t ( n l n-I ) 0 0 1 -1) 0 0 -1) (:I:}-t)' 0 0 0 MQtdu'<'Jngcongph1fc~pbaagiCJclIngc6thi gh6pn)'nhungcungWe nhau dod6trennhungcungconnaychUng13c6thexaydqUgd1t<'JngcongBezierc6 b~cnhohoo .Thy nhi~n~ caediemnOidi~ukic$nc: pbii thaiman Tn'(3-62)13sayracdngth1fctfnhd,o hamctp1va2 33 11 P'(t)=LB,J'1I,t(t) Ostsl k=O (3-72)If P"(t) =LB1J"IIJ (t) k=O (3-73) r n,i(t>=(;)itH(1-t)'"-(n-i)t'{l-tr-<} in}. . i n-;. 1(1-t)IM{---;--}I t z-t (i- nt) J- t(1- t) lI,1(t) tu'dng111 J" . (t)= { (i- nti - nt2- ;(1-2t) } J .(t) (3-75) 11,1 t2(I-t)2 11,1 T~ihai di€m d~uvaCUOlcuadU'<n1gcong(t=Ovat=1) 13kh6ngdUngc6ng ilid'c(3-74) (3-75)d€ tlm~ haidiemnay13dlingd~ohamc1pr0011'san n' r ( r}r(O)= . L(-l)r-i. i(n- r)! i=O I (3-76) (3-74) n' r ( r}r(I)= ( . )1L(-l)'. 1I-in-r i=O I (3-77) viv~yd~oham~ caed~ucunglA P'(O)=n(BI-Bo} (3-78) P'(1)=n(Bn-Bn-l) (3-79) E>i~unay chungtovectortilptuyln~ haid~ueungthiclingph11'dngvdi vectord~uvaeuOlcwldagiaeIdemsoot Tu'dDg111d,o hamdp 2 P"(0)=n(n-1)(Bo-2B1+B2) (3-80a) P"(1)=n(n-1)(Bn-2Bn-l+Bn-2) (3-80b) Do d6 d,o hamc1p 2 cuB.dutJnfeongB~zier~ hai d~uph~thuQcvao hai vectorg~ nh1tcui dagiackiemsootT&g quatd,ohamdp r ~ haid~use du'c;1cxaedPilibillrvectorg~diemd6nMt ~~u }denlientuctaicd.£.4ilmnt5i~dtibngconeQerier Nlu mQtdu'lYngcongB~zierP(t)b~enxaedinhbdicaediemkiemsoatBi 34 vandltie'pvdimQtdu'&gcongQ(s)c6b4cmxacdP1bdicacdi€m ki€m soat Ct.th1di~uki~nd~ohamc{plli€n tq.c~ di~mndichobdi P'(O)=gQ'(O)gJah~s6 Hb1h(3-30)MQts6du'i1ngcongBezierb4cba ~ ~ Bo,1=0 B3,1=1 3,1=1 B Bl B:z Bl 35 tU'(3-78)va (3-79)tathudu'<Jc n Cl-4=-(BII - BII-{) mg tU'di~ukic$nH€n ~c baog&nCo=Bn CI=nImg(Bn-Bn-l}+Bn Vi v~yhudngcui vectortiEpmytn ~ diemn& cwihaiham8emmgnhau ntu bavectorBn-I;Bn=CovaC1cnngphu'dng.Ntu cahu'c.1ngJIn dQlc.1ncui hai vectortitp tuyEnb~ngnhauthiBn=CophiHa diemgiu'acui dU'Ongn& gilli hai di~mBn-I va C1nghiaa CI-Co=Bn-Bn-I=Co-Bn-I hayC1+Bn-I=2Co=2Bn Bi~ukic$nH€n tJ1.cuad~ohamclp 2fa! diemn6iIa m(m-l)(Co-2CI~}=n(n-l XBn-r2Bn-l+BJ tU'di~ukic$n~ vaci H€n~cu,.idiemn6la~n tho n(n-l) j n(n-l) n } { n n(n-l) }Cz=n(m-l)B,,-z-.t.lm(m-l)+ m BII-{+1+2m+ m(m-l) BII vdi n=m-3 ta c6 C2=Bn-2-4(Bn-l-BJ 3-4.&1xunedilm/dimsodtchodliangconeQerier E>~tangtlnhm~mdeochodu'OngcongBeuertac6th~tangb~ccuaham trQnbhg eachtang8lidiemIdem8O3t.Xetdu'~gcongBeziervdin +1diem kiem8oatBo,Bl ,...,BnNayxetdu'~gcongBezierc6n+2diemkiemsoat B*O,B*h ...,B*~I cnngd~g vdi dU'()ngtong ~n khi ly tac6 11 11+1 P(t)-I:B,J lI,i(t)=I:B.j J rrfIJ(t) 1'=0 1'=0 (3-81) vdiB*o=Bo B*i=aJ3i-I+(l-aJBi B*ll+l=Bn ~ziOne coneBerierthqnhtdnehai41/bneconeIM1k1:. Ky th~t Jamm~mdeodu'<Jngtong nghii Ia taQroo dU'()ngtong Bezier chinhxac hdn .C6 the ~ du'<Jcbhg each pMn du'Cfngtong Bezier thanh t&g cui haidu'~gtong .Mulinv4ytaplW xac d!nhdagiackiem80attho hai du'C1ngcongtrongcac diem kiem 8oatban d4u .BaISkydi chungminh dng du'C1ngcongBezierc6thedU'<Jcchia~ blt cltthams6BAotrongkhoang 0StS1eachddngiin nhlta chQlldiemgiui . <X{=iI(n+l)i=l, n 36 Bu'CJngcongBezierb~c3chobill P(t)=(1-t)~o+3t(1-t)2B1+3r(1-t)B2+f B3 O<-.tSl B3=D3 B1 B2 D1 vdidagiacki€m smitBo,Bl,B2,B3 £>agiae4,Ch~, C3xac~ du'CJngcongBezierQ(u)vdi o~u~atu'dngdUg vdinu'athd'nhttcwidu'CfngcongbandiunghiilIaP(t)O~tSll2 Tu'dngt1fdagiaeDO,l)1,D2,l)3xac<Qnhdu'CJngcongBezierR(v)vdi O<-.vSl tu'dngdUgvdinu'athd'haicwidu'<Jngcongband§unghiilIaP(t) 112~tSl caeht$s6CivaDi tlmdU'<;1cbhngnh1l'ngdingthd'cv~vj trivas1fbhngnhau cwicaevectorti€p tuy€nupcaevi tri u=O,t=O; u=l,1=II2; v=O,t=II2; v=l,t=l; dnng(3-62)va(3-72)cho 4=Bo 3(Cl-4)=3I2(BI-Bo)doQ'(O)=II2P'(O) 3(C3~)=3J8(B3+~-B1-Bo)d Q'(l)=ll2P'(1I2) C3=1/8(B3+3B+3B1+Bo)tq n=1t=112 giiiiht}~n tadu'<;1c ~Bo C1=I/2(Bl+Bo) ~=1/4<B2+2B1+8o) C3=1J8(B3+3~+3B1+Bo) tu'dngt1f 37 ~Do=l18(B3+3B2+3B1+Bo) Dl=1/4(B)+2B2+B1) D2=1I2(B3+~) D3=B3 Tu-ktt qua~n tasayracdngth1tctfnht&g quitchoc'c di€m ki€m sol1t~Di 1A Ci =t(i.) Bjj=O J 2' i=O,l, ,n 11 ( n-i ) B. D =~ -L.. i=O,l, ,nI ~ -. 211-1j=i n J Nh~ xetdu'C1ngcongBezierc6nhtrngnhu'<;1cdi€msandAy *B~ccui c'c hamdathtfctrQnIn,iph1J.thuQcvao86di€m ki€m s~t do d6 mu6ntangdQm~mdeocd du'C1ngcong13phii tangs6di€m ki€m so't khi ty b~ccuahamtrQnsetangtheolam ph1i'c~ptrongtfnhtom. *MQtdi~uh~ chtnIDi18c'c hamtrQnIn,i(t)khdngb~tri~ti~uvdfmQithams6 t D<-tSl.dov~ykhithams6tthayd6itbiroanbQdu'iJDgcongbibitnd6i *Khi tamn6nn6nn~ du'C1ngcongbhngc'chthayd6ivectorki€m so't thitoan bQdttC1ngcongbianbhu'dng,trongth1fc1613chimu6nd6thithayd6itrongIan c~ cd di€mki€mso'tnaymathdi. B€ We phq.cnhungnhu'<;1cdi&!m~n ngu'iJi13du'araIt thuyttcd du'CJngcong B-spline(Basicspline).B1t<7ngcongnaychU'aclc hamtrQnJA nh1l'.ngham Bernsteind,c bi~t.Bi~ucdbancd 1j thuyttnayJAm6idi€m ki&!msootBi chi li~nktt duynhttmQthamtrQndov~ym6ivectorId€m sootchianbhu'dngdtn du'<7ngCOBgtrenmQtkhoingthamslfmanmly hamtrQncd n6khdngtri~t ti~nB-splineding chophep~ b4ccuihamtrQnvaVIv4yh4b4ccd d1t<Yng congmakh&g cAngiimslfdi€m ki&!msOOt.Lj thuyttv~du'<YngcongB-spJine IAndju ti~nd1t<;SctrinhbAybdi Schoenbergsand6Coxva Boor dUngc&g th1i'cd~quyd€ dinhnghii d1t<YngcongB-splinev<1itfnhcMt dc$quynayde dangapd1J.Dg~n maytinh. 38 4-.BuiING CONGBSPLINE 4-1.8;" 1I1lhiaFatin, cltdt . MQtlh nd d~tP(t)13vectorvi trfdQCtheod1t<7ngconI ,hamnaydu'<1C xemnhu'13hamvectorthootbams6t .E>u'<Jngcoal B-splinec6phu'dng1rlnh chobdi IIit P(t)= ~BjNi,k(t) i=1 dd4yBf13clc vectorvttrfcwln+1vectordP1hnghi8dath11'cki&nsoatva hamNi,t13cachamtrQncwldu'CJngconIB-spline(haycOngQiIahamcdsd chuln) Ta ctplhnghiihamcdsachulnth11'i c6dp k (orderk) vab4ck-l (degree k-l)]A Ni,a:(t)dPilibdic&g thItcde;qnysan - { I if Xi:S;t<Xi+l Nj)(t)- 0 _~1.- .umeI'W1Se faunSt <fm.x 2Sk S n+l (4-83) (4-84a) Nj,k(t) =(t-xJNi,H(t) +(Xi+k-t)Ni+1,H(t) Xi*-! -X. X -XI i+k .iil (4-84b) trongd6vectorX=[XtX2 xnJ gQi13cacvectorKnot chtingthoaman XPxit-l vathams6t biln ddit1\"tmmdln fmaxdQCthoodu'<7ngconI P(t) E>ichoth~ ti~ taquy11'&M>=O Thdng thu'i7ngdu'CJngconI B-splinedu'<1C<tpilinghii nhu'18hamda thItc ctp k ( utcb4ck-l) quaclc vectorkiim sootBi moomiD cactfnhchlt *Ham P(t)lA hametatlnt'cb4ck-l ~ m6ikhoing"XtS t<Xi+l *P(t) va d~ohamcwin6dp l,2,...,k-2 ~n tv.c~n toADdu'i7ngcong *V1ham.B-splinetbl1cchlt 18dUngJamhamtIQa"chodu'<JngcongB~ziernen cactfnhchlt cwl du'iYngcoogBezierding thai chocIu'<JD.gcongB-spline *T6ng cwlclc hamcdsdB-splinechomotgi8tti cwi thams6t lA fNt,k(t)= 1 (4-85) i=t *M6ihamcdsdthlkhdngim ie ..Ni,~ *Ng~ trirk=1m3ihamcdsdc6daynhltmQt"giatrimax *Clp 1<1nnhttcui du'<Yngcongtb1bhg s6vectorkiim scat~+l) *OSthi biln ddi du'~gcoogtbdngquabiln dmcacdiintkiim8o8t 39 *B1t<JngconIn~ trongbaa16icwldathtfckic!msail . Th1fcchit baa16icwld1t<JngconI B-spline~ hdnbaa16icd du'<JngconI B~zier.Cha<MYngconI B-splinectp k (b4ck-l) mqtdic!mubi treud1t<fng conI thlnlm trongbaa16icd k dic!m]§n~ Tft'tinhchlt baaldi naytad~dangsuyranta ttt ci ~c dic!mIdc!msail Ja th4nghangthldu'<7ngconI B-splinecUngthing~g v~ ctpk my1 .Hm tht ntu c6L vectorIdc!ms04ttJdnghangth1d6dq sec6it nhttk-2cung tJdng hanguta vectorthinghang]Adic!mb~td~u.Ntu caicdic!mtldnghangkb&1g phii 18dic!mb~td~uhayklt tildecwldagiatckilm soatt.thlc6itnhtt L-2k+3 cungthhg bang.Nc!ul~t vectortilAnghang]Adic!mcadicwld11'~gconi tbl c6itnhttL-k+l cungthinghang H1Dh4.32Tinhcb4t1&cuidn'iJngcongB-spline . K=2 K=] '7 / / / / '/ K~ 40 1'=6 K=8 IDnh(4-33)TfnhcbltJ6icui dtmngcongB-8p1ine)[himc,t86vectorcui <1ape d6ngplntdug.(a)ae vectorct6ngpim'mlgnlmpbd.trongdiy caevectorki~msoat .(b)dm u,..idiemcu4icui eliycaevectorkiemsait I-- Cot... C11neJI IIIICIII-, .. . . . r- t C<III.-"'IF" -- ~ K=3 (a) r.. ~ . -CoIinc8r ~ venica i ~~ :;/CoI- 1 '--, :::: ~----..-~ .-"- -.....- - 1'=3 (II) 41 *Ntue6 Itnhtt k-2di~mlriimscatttUngnbauie .,Bt=Bi+l= =BiR-2thlbaa Idi cwl Bi wi Bi-t+2chfnh ]Avector d6 .Vi v4y dU'<Jngconi B-spline pIW di qua di~md6 .Hm thi vi B-splineIAdlt<7ngconi Ct-2n~n~en~nn6pb8i(!--2n& ~c..i Bt IDnh (4-34)TIDh16ikbivectoretagiic trbgDhau ;k=J BI B2 ~" """"........ """"" B~, B6 BJ ' ~B "" '" k =3s ", """ ", 87 88 Figure4-34 Convexhullforcoincidentpolygonvertices,k =3. "4 . I IBI I~ ", " " ," , B- 0 , , , , , , , , " B4 , 6, , , " k=3, ,, , ;r -( B7 B8 Figure 4-35 .__Smooth(Ck-2) transitionintos~rai~~~s.e~ents. eudi cnng vi t1nheMt (!--2OOn~c cui 4utJngcongn~nd6thitaldiim trUngse bi u& thbg nJnthJnh (4-35) 42 HbIh(4-35)Sf tron(~-1)cui dn'iJngcongbi6act6tbjthUhdo'iJngtbAngtatB. Bing th1fc(4-84)bi€u thirhngvic$chQllvectorknotc6anhhu'dng1&1dtnc'c hamcdsONJ,t<t)vadod68nhhu'dngdEndu'<JngcongB-spline.Bi~ukic$nduy nh!tchovectorknot]AxtSxi+lnghia]Achdng]AdAy56thtfcddndic$utang. C6 3 1~ cdbin cwi vectorknottbu'&gdUng]A: UDiform,openuniformva nonunitorm *Trongd;JngUniformkhoangchiac'c tQcui vectorknot]Abbg nhau vfd\t [0 1 2 3 4] [-0.2 -0.1 0 0.1 0.2] trongdn1cbanhvectorknotd~g uniformth1tCJngb't diu bbg 0 va khoing ~ch 18 1dtnmQtgmtQmaxhaytrongd~gchili ]AmQtdAytU'0 d6n1de khoing~ch]AmQts6tb4pphh vi dtJ [0 0.25 0.5 0.75 1] C6 ~ clp k ntu ~c vectorknotc6d~g wUfonnth1de tWotrQncdsO NJ.t<t)dn hoanvathoomanNt.t<t)=N1-1,t<t-l)=Ni+l,t<t+l)nghii ]Am~ihamcd sd]Atinhti& cwimQthamcdsdDO d6 43 Hinh (4-36) mm. CCfsOcui dlrlJDgcongB-spline, [X]::[ 0 1 2 3 4 5 6]; n+l=4;k=3 1.0 N1.3 Nu N3.3 N4.3 L-.. 'I'. - '.~\,, \.! t ."" -- .-- - .'"" Figure4-36 PeriodicuniformB-splinebasisfunctions,[X ]= [0 1 2 3 4 5 6], n + 1= 4,k = 3. *Trongd~g openuniformtQcwi vectorknot~ baidju d1t'1C]4p~ ItJAnd6i vdihamcdsONu{t) c6clp k ,cacvectorknotcOnbPc6khoangeachbmg nhau vi~ ~2 [0 0 1 2 3 4 4] k=3 [0 0 0 1 2 3 3 3] k=4 [0 0 0 0 1 2 2 2 2] d~gchuincd openuniform vi~ k:=2 [0 0 1/4 1/2 3/4 1 1] k=3 [0 0 0 1/3 2J3 1 1 1] k=4 [0 0 0 0 1/2 1 1 1 1] T6ngqut cacvectorknotcui d~gopenuniformd1tf1ctfnhbdic&lgthd'c xt=O l~ i ~It XFi -It k+l~ i ~n+l xt=D-It+2 n+~ i Sn+k+l Nhltv,y s6caevectorknot]Am=n+k+l 44 !at quachothly cafehAmCdsad~gopenwrifOl1llthnd1tqcdn'tlngconi t6i nhn'cafemmngcOOlcuaBezier.D,c bic;tkhiclp cui hamcdsdbbg vdi s6 vectorIdem~t (k=:n+1)vacafevectorknot18d~g openuniformthldu'lJng coni B-splinetrftngvdid1t~gconI Bezier.Trongtntilnghw nayvectorknot cok tri0theosan18k tt.i1. VId1J.k=4vadagmcIdemsmtco4vectortblvectorknotd;plgopenunifonn18 [0 0 0 0 1 1 1 1] HbIh4.37HAm00sdcuidn'iJngconIOpenunifODllB-spline. [X]::[0 0 0 1 2 2 2] k=3;D+l=4 1.0 I i t- I,I,:i- -~ , ~ Figure 4-37' OpenuniformB-splinebasisfunctions,[X ]=[0 0 0 1 2 2 21.k=3,n+l=4. *D~g nonuniformkhi ly ac vectorknotc6 thaingc4chtayj va ac knot tmngnbau]Atay'1n~ d ~n troDgcui vectorknotchdngcothec6chukt hayd~g ~ [0 0 0 1 1 2 2 2] (d~gopennonuniform) [012234] [0 0.28 0.5 0.72 1] *Ntu vectorknotco d~guniform,openuniform,nonunifonnthidU'lJngconi B-splinetrongtntlJnghc;fpnaygoidt Ja uniformB-spline, openB-slpineva nonuniformB-splinetu'dng1ihg. 4S *Qch tinhhamcdsdNi,t<t)dotinhde;quyn~ntaplW tinhclc c{ptm'&d6 theotamgi'c san Ni,k Ni,t-l Ni,k-2 Nitl,k-l Ni+l,t-2 Nk-2.t-2 NJ,l Ni+l.l Ni+2.1 Ni+J.l Ni+k.l vi ~ tinhc'c hamcdsdNi,t<t)vdic{pk=3vas6di~mki~mso'tn+1=4 Ni,Jdtt~ chobdi Vidu(4-) TinhcaehamcdsdchodttCJngcongc{p3 (k=3)vdin+l=4diemkiemso't vdi vectorknotla uniform fasur ravector X={Q12 3 4 5 6] XI=O, X1=6tham56 OS t S 6 DUngcdngth1i'cde;quy(4-84) OSt<l N1.1(t)=1 N1,z(t)=t N1,.3(t>:r IS t <2 N2.1(t)=1 Nu(t)=O i:#:2 N1,z(t)=2-t N4,z(t)=t-1 NJ.2(t)=o i:#: 1,2 N1,3(t)=(tI2)(l-t}f{3-t)(t-1)Il N2,3(t)=(t-I)2f N1,3(t)=Oi:#: 1,2t3 2St <3 N3.1(t)=1 N~t)=3-t Ni,l(t)=O i:#: 1 N~t)=O i:#: 1 NI,3(t)=O i:#: 1 Nu(t)=Oi * 3 N4,z(t)=t-1 Ni,2(t)=o i:#: 2.3 46 N1,.3 N2.J N3,J N4,J 'N\,2 N2,2 N3,2 N4,2 Ns,2 Nl,l N2,l N3,l N4,l NS.1 N6,I N1,3(t)=(3-t)2Il N2,3(t)=(t-l)(3-t)/2+(4-t)(t-2)11. N3,3(t)=(t-2ill Ni,3(t)=Oi * 1,2,3 3~t <4 N4,l(t)=1 N3,2(t)=4-t N2,3(t)=(4-t)2fl N4,3(t)=(t-3)2/2 4S t <5 NS,l(t)=1 N4,2(t)=4-t N3,3(t)=(4-t)2fl N4,3(t)=(t-3)(4-t)/2+(6-t)(t-4)/2 NI,3(t)=O i ~ 3,4 NI,l(t)=Oi *4 N4,2(t)=t-3 NI,2(t)=o i * 3,4 N3,3(t)=(t-2)(4-t)/2+(4-t)( t-3)/2 Ni,3(t)=Oi * 2,3,4 NI,l(t)=Oi * S Ns,2(t)=t-4 Ni,2(t)=o i * 4,5 SS t <6 N6.1(t)=1 Ni,l(t)=O i:;; 6 Ns,2(t)=6-t NI,2(t)=o i:;; 5 N4,3(t)=(6-t)2fl NI,3(t)=O i:;; 4 Vi d~(4-10) Tinh caehamcd sdchod1t~gcongctp 3 (k=3)vdin+I=4dic!mkic!msoatvdi vectorknotIAopenuniform tU'cc5ngth1i'ctinhvectorknot Xi=O IS i Sk Xi=i-k k+1Si Sn+l Xi=n-k +2 n+2S i S n+k+l tasuyravector X={O0 0 1 2 2 2] Xl=O, x1=2thamslS OS t S 2 DWlgc&tgth1i'cdc$quy(4-84) OSt<l N3.1(t)=1 N2,2(t)=l-t N1,3(t)=(I-t)2 N3,3(t:>=r11. IS t <2 N..,l(t)=l N3,2(t)=2-t NI,l(t)=Oi * 3 N3,2(t)=tNj,2(t)=oi * 2,3 N2,3(t)=t(l-t)+(2-t)tIl. Nu{t)=Oi * 1,2,3 NI,l(t)=Oi * 4 N",2(t)=t-1 NI,2(t)=o i * 3,4 47 N2,3(t)=(1-t)212 N4,3(t)=(t-ll N3,3(t)=t(2-t)l2-+(2-t)(t-l) Ni,3(t)=Oi ~ 2, 3,4 Gii sO'vector knot X=[ Xl X2 X3 x.. Xs X6 X1 ] s6vectorknotm=n+k+l=3+3+1=7 khi ehot eluJ.ytirXl d6nX213tfnhd1t~Nl,3 khi ehot eluJ.ytirX2d6nX313tinhd1t~~,3 khiCOOt ehaytir X6d6nX113tinhd1t~Nes,l Khi ehot eh~ytrongkhoing[Xi,xi+l]th1k=3hamcdsdNi,it) tnt& d6We khdng(Ni-2,it);Ni-l,it);Ni,it» cOneiehamcdsdWe d~ubhngkhdngdod6 hamP(t)ph~thuQcvaok=3hamcdsd tIenm~ikhoing(vdik ~) T6m~ s1fph~thuQceiehamcdsdvaode vectorknotnhu'san N6uvectorknote6danS!:uniformX=[l 2 3 4 5 6 7] -Nlu vectorknote6d~g openuniformX=[O0 0 1 2 2 2 J=[XIX2X3x..XsX6 X1] NhU'v4,ymOihAmcdsdseWe 0 trenk=3khoanglien tilp cui vectorknot E>i~unayeh1fugtom~ivector)dimsoatBi seinh hU'dagtrenk=3khoangcui vector'knot , T6m¥ E>itAngtfnhm~mdecui dttCJngconIB-spline13e6de deh san 48 knot Xl X, X3 x.. Xs X6 X1 value 1 2 3 4 5 6 7 Nl3 WeO khae0 khae0 0 0 0 0 N23 0 khae0 khae0 khae0 0 0 0 N33 0 0 WeO We 0 khae0 0 0 No 0 0 0 khae0 WeO WeO 0 Ns.2 0 0 0 0 WeO khac0 We 0 NCSI 0 0 0 0 0 We 0 We 0 knot Xl -x.. x.. -Xs Xs t DSt<l lSt<2 1=2 Nt.] WeD 0 0 N23 WeO WeD 0 N33 We 0 WeD 0 N4.3 0 WeD 0 Ns.2 0 D D N61 D 0 0 *Thayd6il~ cui vectorknot(mriform9openu iformhaynonuniform) *Thayd~icj'pk cd JWncdsd H1nh(4-41) *Thayd~is6bt~gvavi1rfcuicafevectorkiimsootBt *Su-dtplgvecto£Idem5O8tttUngnhau( h1nh(4-42»kbivectorkiemsoaitcang trUngnhaunhi~uthl du'iJngcongcangti6ng& d6acti&1trUngd6 .Khi sf) vectortn\ng]Ak-l th1du'iJngcongctiquadiimd6 *su-d1Jllgtmngnhancui clc knot(khid6clc JWncdsdsethayddi) ffinh (4-41)Anh1m'cb1g511tbay46ib4ctr!DdlmDgcongB-spline '1 r B2 5\ 1- 2 4 6 8 .( Figure 4-41 Effectof varyingorderonB-splinecurves. H1nh(4-42) AnhJnn}ngvector~ tP~ tr&dltaDgconiB-Spline.k=4 49 y 82 5 3 multiplevertices - 2 multiplevertices ".' .. --' " 0 0 2 4 6 8 .t Figure 4-42 Effectofmultipleverticesat B2 ona B-splinecurve,k = 4. IDnb (4-43)Sf inh hu'&IgClJC~I4icacdiemkiems~t Yi '[A~ 82 'r' r ol 0 ic= 4 .. 4 85 6 8 .t Figure 4-43 i.ocalcontrolofB-splinecurves. IDnh (4-43)biiu thidu'CJngeongB-splinedp 4 vdi 8 vectorkiim sOOtkhi tadi chuyin Bs dtn caevi tri B' 5va B" 5 tbi du'~gcongchi inh hU'dng~n cae cnngB,B.. ,B..B5va Bs~ ,BcsB7.T&g quit khi taddi vi td cui vectorkhiim ~t till chie6 :tkJ2congquanhdiim d6bi8nhhU'dng. 50 4-2.8"/din JlitimthOnl!adcud..J:gdn1!conI!I)-spline TrongtntCJngh<;1pvectorknotJAuniformthams6dU'Ongcong bigiant xu6ngm~cdilvectortilp tuylncui dU'C1ngcongtaihaid~uvAncilngphU'dng vdihaic~h d~uvacudicui dagiacnEmsoot vi d~k=2vectorknotX=[0 1 2 3 4 5] thamsO' l~t~4 k=3vectorknotX=[0 1 2 3 4 5 6] thawsO' 2~t~4 k=4vectorknotX=[0 1 2 3 4 56 7 ] thamsO' 3~t~4 t6ngquatthamsO'tchicontrongkhoangk-l~t~n+lJAkhoangmacacham cdsdd~ukhackhong HJnh (4-44) Anhhu'dngs1fthaydOib4ctrendu'CJngcongB-spline y B2 Sr 84 / 0 81 0 B3 1- 2 L 4 1- 6 1- 8 x Figure.1.-44 Effectof varyingorderonperi'ldicB-splinecurves. IDnh (4-45)Anhhu'c}ngvectorbt)i1&1duiJngcongUniformB-splinek:=4 51 V1 - I I I lOl- I B2 B2 8 No multiplevertices-- 2.0 3.0 B~ t l 2 4 6 8 x Figure 4-45 Effectofmultipleverticesona periodicB-splinecurve,k =4. 4-3.Tun pluJdnfltrinh tldJInflCOIIItIdnbdnlt4dJJn1tconltB-qlilN pli pl/clor pot @ IlIIifonn IDnh (4-6a)biintJQdu'C1ngeongB-splineci'p4 (k=4)vdidatJnted6ng B1~B~..B5BJ3.JBsBl()dAyvectorcURtiend1t~14p~ ehovector'cu6ienng .DoSI1giim tMng sdnendu'€Jngcongkh&g 1dn. Vectorknot trongtru'lJngh<;fpnAya x={01 234567 101112] v<1ikhoangem,.ycu8th&gsd ]A3StS 9 (dok-IS tSn+l) Dov4ymn6nchodu'<JngconI1dntadn 14pbp.ik-2vectorki&nsoftt4idim cudihJnh(4-46b)ehokdtquacui dathttekiim soitB1~B~J35BJ3.JBsBIB2B3 vectorknothienAya X=[0 1 2 121314] . khoingth&.gs6 3StS 11.caedagmesandingehocUngk6tqui BaBIB1B~J3sBJ3.JBsBl~bay8J B. B1~B~J3sB6B7BsBl 52 H1nh(4-46) Du'iJngcongUnifonnB-spliDekin .(a)Bl B1B3B4BsB6B7B. B11Aeta~c ki&n soat.(b)B,Bl B1B3B4BsB6B7Bl B11Aetagiicki&n 504t 4-4. 1IUltnlncudoluJdnl!trinhddJJnl!conI!B-MDIin. BttbngcongB-splinec6thi via du'c.1id~ngmat$1 nJnt phu'dngtrlnh du'bngcoogB4cbavaBt!zier(xem(4-27)(4-44)va(4-67» *D~g mat$1 d~cbic;tdongianchodu'bngconguniformB-splinevi khi ly clc IWncdsd Ni,t<t)IaQnhtiln cui nhaavAinh hu'dngcui m6ihAmcdsd l~ndu'OngcongIa~n k khoingcui vectorknot(xembinh(4-36»vadotham s6btP'i ~ trongkhoangk-l~tSn+l bbg cich d6i bi'n 18c6 the!chaye!n~c hAmcd sd trongkhoangnayv~ khoing0<-t*<1gQihamcdsdnayIaN*~t*) vi ~ xt!!vi d~(4-)n+l=4k=3vectorknotX=(0 1 2 3 4 5 6] khoanggidi~ cui !hams62St<4 Trongkhoing2St<3clc hamCdsd1Ad~ukMc kh&g vaclc hAmcdsdtrong c~ckho8ngWc d~ud6ngd~gvc.1imQthamcdsdnaoct6trongct~ nAy 53 Yt Y IB6 B5 +B6 B5 4r -- . -----....... ,B4 4,.--- . ---- tB4 I i 2 B7 B3 2tB7 tB3 I ,. JB1 B BI J' 8 i .O. . - 0 2 4 x 0 2 4 x (a) (b) Figure 4-46 ClosedperiodicB-splinecurve.(a) BIB2B3B4BsB6B7B8BI asthe definingpolygon;(b) B8BIB2B3B4BsB6B7B8BIB2 as thedefining polygon. N1.J(t)=(3-t)2/2 Nz,3(t)=(t-l)(3-t)/2+(4-t)(t-2)/l NJ.J(t)=(t-2i/2 I:),t~2-t* tachuy~ntham56v~OSt* <1 vacltchamcdsdse1A N*l,J(t*)=(l-t*i /2 N*2.J(t*)=(-2t*2+2t*+I)/2 N*J.J(t*)=(t*)2/2 Nlu 2<t <3 hamB-spline1A P1(t)=N1,3(t)B1+Nz,3(t)Bz+NJ,3(t)BJ Nlu 3~t<4 hamB-splineIA P2(t)=NZ.3(t)Bz+N3.J(t)B3+N4.3(t)B4 (Xembinh(4-36) trongkhoingnayNZ.3(t)=N1.J(t);NJ,3(t)=N2,3(t);N...J(t)=N3,3(t) vi~i~ P2(t) P2(t)=N1.3(t)Bz+Nz,3(t)B3+N3,3(t)B4 Dod6nlu x~thams6ttrongkhoingOSt*<1 tac62phu'dngtrlnhU'ngvdihaikhoangcui tham86td~n 1A Pj{t*)=N*1.J(t*)B1+N*2.3(t*)Bz+N*3.J(t*)B3vdi j=1,2 (4-87a) T6ngquatphU'dngtrlnhcuadU'bngcongunifOlUlB-splineclp kvan+lvector kiim so't1A Ptt*)=N*l.t<t*)Bl+N*2.t<t*)Bz+ +N*t.t<t*)BjR-lvdi j=I,...,n-k+2 vaost* <1 hayyilt gQll~ H P (t*)= ~N. i+t,k(t*)Bj+i j i=O (4-87) Tatrdv~vi d11-~ vdik=3;n+l=4 nY(4-87a) 2Ptt*)=(l-2t*~)B~ -~ +2t*+1)Bjt-1"+t*'Bjt-2 ~(Bj2Bjt-l+Bjt-2)+(-2B;+2Bjt-l}+{B~jt-l) vilt d1ntid~gmamjn Ptt*)=ff*] [N*](G] 54 [1 -2 I [ Bj ] =~[t" t* 1 -2 2 0 Bj+' 1 lOB j+2 (4-88) Tu'dngnrchok=4cachamcdbinsaukhitbams6hoo~ thi du'<;1c N*I,4(t*)=(-t*3+3t,..2-3t*+1)/6 N*2.4(t*)=(3t~+6t*2-f4)16 N*3,4(t*)=(-t*3+3t0te2+3t*+1)/6 N*4.4(t*)=(t*3)16 p~t*)=rr*][N*][G] -1 3 -3 1 Bj 3 -6 3 0 B.. 11 J -3 0 3 0 Bj+l 1 4 1 0 Bj+J Tft'(4-88)va(5_89)tasuyrahamtrQnF T6n~quat:Phu'dngtrlnhdu'~gconguniformB-splinec(pk vdin+ldi~m ki~mscatIa: =.!.[t,.1 t,.J. t*6 (4-89) P~t*)=LT*][N*][G]=[F][G] (4-0) vdi[T*]=[t*k-l t*k-2 t* 1 ] ~ t*<1 [G]T={Bj Bj+-l Bitt-l ] l~j ~-k+2 j chis6khoingcd vectorknottrongkhoinggidi~k-l~ tSn+l suyrahamtrQn[F]=LT*][N*] CohenvaRiesenfield i chungnrinhdu'<;1c [N*]={N*i+lJ+tJ (4-1) vdi N* 1. t+I.jiI=(k -I) I n t+lJ+l(t*) 1 ( k-l~ - _ ( k )- (k-l)1i x:;(k-(1+1»'(-I)l-)J - j os iJ Sk-l v4yd1tCYngcongtdngquatunifoImB-spline 55 . 1I*1k IBj Bj+I . lI*jiolBj+H 4-S.DUnUlli ormB- liIuI 4dhn COlI kin Nh1tta di hilt d1t<7ngconI wrifonnB-sptinec6thi dUngde x§y d~g phttdngtrlnhchodttCJngconI kin .Tnt& hlt tadn.~ nghii chinhxic thl naoJ.adtt<JngconIkinsand6x§y~g ph1tdngtrlnhcui n6 *MQtdttCJngconI kind~g uniformB-sptinedttt;fCgQi]Akinntnphu'dngtrinh thams6c6d~g k-f. Pji-l(t*)= L N*i+l.t<t*)B(j+i) mod(0+1)+I i=O OSj ~n B(j ...t(,...»)fi B«(j+l>-4(,...»tl ~+I(r')=[~][N*]=I. (4-3) B ((j+ 1+n-k ) aMd( ,... »)ti vdtLT*]va[N*]chobdi(4-0) *Tnt<Jngh<;1po enB-spline n+l Tn"~ nghiaP(t)=LBfNi,k(t) i=J. P(t)= N1,t<t)B1+~t<t)B2+'oo" +Nn+l.t<t)Bn+l hayd1twd~gmat$ P(t)=[F][G] [F]=[N1.t<t).oooo Nn+l,t<t)] [G]T=[Bl oooo...oooo.Brt+1J vid~g openunifOlDlc6k ttidu't;fC14p~ f4ihaidiu cui vectorknot dod6ta kh&lg~ch IDat$ [F] =[T][N],Nbttv4ytrongcic tntCfngh<;fpopenhay nonunifonnph1tdngtrinhdu'<JngconIptWdU'<JC1fnhtU"ctpilinghii Vi ~ (4-15) ChodutSngconIkinctpk=4xic dinhbencic vectorIdem8O8t . B1[20],~[4 0],BJ[4 2],B..[44],Bs[24],B6[O4],B,[O2],Bs[O0], B9[20],viv4yn=8 trongm& khoingOSt*<ltd'(4-89)(4-3)18c6 56 . 11*1111 12 * Ptt*)- 1 [t*" 1 I 11 11 toll 1 (k-l)! I' 11* lI*tzit 1 Pjt-l(t*)=-[t~ t~ t*6 -1 3 - 3 1 B<1.-18+1) 3 - 6 3 0 B«(j+1)mM8it) 11 B- 3 0 3 0 «j+Z>-'ttt) 1 4 1 0 B«)+3)1IID48+1) osjS8 T~ t*=I/2vatr~ncungj=OtQcuahamlA -1 3 -3 1 .s. 1 [ 1 1 1 ] 3 -6 3 0 B" P1(112)="6"84" 2" 1 -3 0 3 0 ...~ 1 4 lOB. =[3.9 1.0] T~ t*=I/2vatIencungj=7tQcuahamlA -1 3 -3 1 B8 1 [ 1 1 1 ] 3 -6 3 0 .s. PI(1I2)="6"8 4" "2 1 -3 0 30 Bz 1 4 1 0 B3. =[2.9 0.4] 4-6DaoI.amc 1 J.'tZ2cutitbIJJn Tn'phu'dngtrlnhdu'CfngcongB-spline nit P(/) =LBjNj,k(t) i=1 tasur ra (4-5) n+t P(/)= LBjN'j,k(/) :1 (4-6) P'(t)=LBjN"j,k(t)i=I . Ni,H(t)+ (I - Xi )N'j,H (t) (Xi+t - t)N'tif,k-l(/)- N tft,H(t) N'j,k(t)= + (4-7) Xiti-i - Xj Xj+k- Xtif Do N' u(t)=O'v't Ntu k-2 18c6 N'j;J.(/)= NjJ,(t) - Nt+)J(t) (4-8) Xi+i-I- Xi Xt+~- Xt+l 57 B~ohamctphai 2N'i.k4(t)+(t-XJN"i.k4(t) (Xi+t- )N" i+l,k-1(t)-2N'i+1,H(t) N'\.,k(t)= + Xi+!-lXi Xf+t- Xi Chn y 13N"u(t)=OvaN" i,2(t)=O\it Ntu k=318c6 N"i,3(t~2( N'~ (t) N'iil,1 (t» ) (4-100).Xi+t-1- Xi Xi+t- Xi+1 (4-9) 4-7.Di&.ld n cu61chodu'Ohcon unifannB One Trongphh tru'&18di bittdu'cmgcongunifonnB-splinekhdngb~td4u ~i diim d4uvadiEmcudicui dagi4ckiEmso't .Haic§uhoidu'c;1cd~tra ]A: MQt ,BiEmd4uva diEmcudiWngqUt cui du'cmgcongnayd d§u?va di~n ki~n(d~oham)nhu'thtnao~ nhfi'ngdiEmnay1 HaiJ.-amtht naodEchdngc6thEbiftd4u~ diEmd4uva diEmcnolva di~n ki~nkhi d6 ~ nhtl'ngdiEmnayIa gi ? 4-7-1.Vi trl dilm dduvadilm cu& vadiiu Jelencudn6 Barskydi nghi~nc11'udi~uki~nchotru'cmgh<;1pd~cbit$tIa du'OngcongB4c ba (k=4)B-spline. T6ngqut gii sd'du'&gcongunifonnB-splinebAtd4u~i Ps=P(t=xJva ktt thnc~ Pc=P(t=xn+l)gii s«khoanggidih~ncui !ham86bAtd4u~ zero 18 c6 Ps P(t=k)va Pc=P(t=n)tU'(4-87)va(4-1)va b(t C1tdiEmnaonbI tn!n du'<fngcongd~uphv.thuQcvaok vectorkiEms~t Chothams6c~y trongkhoang~ t*<1,BiEmb~td4n~ t*=OBen Ps- (k~l)f(N*t,lB1+N*t,2B2+ +N*t,tBJ doN*t,t=OvdimQik n~n Ps (k:l)!(N*t,lBl+N*t,2B2+ +N*t,t-lBt-l>n~ (4-101) t Bi~nkic$ncudixiy rakhit*=1vachti'9L N*u=O F1 vataidiEmendi18c6 . 1 c c c Pc- (L N*i,2BO-k+3+L N*uBn-k-H+ +L N*i,tBn+l) (4-102) (k-l)! F1 i=I i=1 *Vdi du'iYngcongb4c2 (k=3)du'iYngcongUniformB-splinec6diim d4uva diEmcadiIa Ps=l/2(Bt+~) 58 Pc=ll2(Bn+Bn+l) Nhu'v4Ydu'CJngconI b~chaiuniformB-splinesedixu4tpMttP tmngdiem cui cungd~uvacungcuc5icui dagiic Idim soit *V~idu'CJngconI b~c3 (k=4)d1tCJngconI UniformB-splinec6diim d~uva diim cuc5i]A Ps=ll6(Bt+4B2+B3) Pc=II6(Bn-l+4Bn+Bn+l) **Nayx~di~uki~nd,o hamtP haid~ucwldu'&gconI Tft"(4-0)d,o hamdp 1~i diemb;{td~u]A p(t*)=rr*][N*][G] (4-103) Ps'(t*)=rr'*b[N*)[G] (k~1)1(N*t-l,lB1+N*t-t,2B2+ +N*t-l,k-lBt-l) TU'N*t-l,t=Ochotlt cak Dadhamb~cnh!ttP diimcuc5i]A Pc'(t*)=rr'*]~l[N*][G] 1 .H .H = k (L (k-i)N*i,2Bu-t+3+L (k-i)N*i,3Bn-t+4+ +( -1)1 i=t i=l . k-! +L (k-i)N*i,tBn+l)(4-104) i=t dd§y[l'*']=[(k-l)t*<t-2)(k-2)t*<t-J) ... 1 O]]Ad,ohamc(p 1theetham s6t *N6uk=3tac6dU'()ngconI b~c2unifonnB-splinedi~uki~nd,o hamtP hai d~ulA P's=ll2(-2Bl+2B2)=BrBl P'c=ll2(-2Bn+2Bn+l)=Bn+I-Bn f)i~unaychd'ngtovectortilp tuyln~ haid~ubhngvdivectord~u.vavector cuc5icui dagiacIdim soit Nlu k=4tac6du'CJngconI b~c3 P's=1J6(-3B1+3B3)=112(B3-Bt) p'c=ll6(-3Bn+3Bn+l)=1/2(BD+l-Bn-l) trongtnt<Ynghc;1pnayvectortilp mytncwidU'CJngconI~ diEmd~ubbg nU'a vectorB3d6nB1vavectortic!ptnyc!n~ diEmcuc51dingbbg nmivectorBn+l dc!nBn-l **f)~ohamclp 2~ diEmd~uvadiEmen&. p"s=ff*"b[N*][G] (k:l)1(N*t-2.1BI+N*t-2,2B2+, +N*t-2,k-IBt-l)(4-105) PeU(t*)={T'*~1 [N*)[GJ 59 2 k--2 k--1 =(k-1)1(~(k-i)(k-i-l)N*i,2Bn-t+3+~ (k-i)(k-i-l)N*uBn-t+4+ k--1 +L (k-i)(k-i-l)N*i,kBn+l)(4-106) i=l rr*"]=[(k-lXk-2)t~-3) (k-2)(k-3)t*(t-4) ... 1 0 OIIad,oh8mctp2theo thamsO't *VdidU'CJngconi ~c 3(k=4)di~uki~nd,o h8mclp 2tJW1h P"s=ll6(6B1-1~+6B3)=B1-~+B3 P" e=116(6Bn-l-l2Bn+6BD+l)=Bn-l-2Bn+BD+l Tdi diy tadagiii quyt!txongvi~ctlmvi 1IidiemcUBvadiemcu6icui dU'<Yng coni uniformB-splinecUng~c di~uki~ncd n6.Nayquaysangm~ hai .4-7-2 .Di~ukiln dilm dduvadilm cumv~dilm dduvadilm cudi.cudda ide kiimsodt Nhu'!rend3 bi€t mu6nchodU'<Yngconi 'titnwi ' diEmkiEmsootnaota chic~nchodiEmkiEmsoatd61AdiEmbQi(iethaibaanhi~udiim mmgnhau) va d~cbi~tn€u diEmbQi d6l8 k-l (c6k-l diEmkiEmsoattmngnhau)thl du'C1ngconi sedi quadiEmkiEmsoatd6va hu'&Igcuavectorti€p tuy€n ~ diEmnaytrUngvdivectorkt c~ g~ nhi'tkhackhdngcui dagiackiEm. soatNhu'v4yd€ giii quy€tb8itOOnayngU.'ditachialam2Idp:MQt,kythwj.t I dUngvectorbQi.Hai,k}1thwj.tdUngvectorgii. 4-7-2-}Kythu4.li!UngvectorMi~ Vi~ chok=3vavectorbQi2uphaid~ucd dapc ki&n~t ie .,Bl=~ va Bn=Ba+lTU'(4-IOl) va (4-102)thudu'<jc Ps=1/2(B 1+B2)=B 1 Pe=ll2(Bn+Bn+I)=Ba+l Chok=4vavectorbQi3 uphaid~uie .,Bl=B1=B3vaBn-l=Bn=Bo..l T~(4-IOl) va (4-102)thudu'<;Sc Ps=lI6(Bl+4Bl+Bl)=Bl Pe=II6(B""I+4Ba+I+Ba+I}=BD+I 60 y ~ 5 2 6 s .t4 (a) y B1 5r- Bs. B6 ~ L 4 L 6 l- S .t (b) Yt BI 5 0 0 (c) l s62 4 .t Figure IIr52 Effectofmultiplecoincidentverticesattheendsofthedefiningpolygon (k =4). (a)No multiplevertices;(b) twomultiplevertices;(c) three multipleverticesandthecorrespondingopenB-splinecurves. 61 lDnh(4-52)Bi& thicinhh1l'&1gvectorbC}it4ibaicUDetagiackiems~t (k=4).(a)KMngvectorbC>i;(b)HaivectorbC>i;(c)BaVectorbOivatItc1llg1tngv(fidlrc)ng congOpenB-spline V<1ivectorbQibaphU'dngtrlnhdU'CJngcong~cungd~uvAcungcadi (chttadiimkiEmsOOtdAuvacudi) dhgvdik=41A P1(t*)=B1+t*316[B4-Bd=B3+t*316[B4-B3]O<-t*<1 Pl1(t*)~BM-l+(l-t*3y6[Bn-Bn+l] BMunaychdhgtonhil'ngdiEmd cungdAuvacudl]Atnylntfnh.nghii ]A hai d~ud6tht]Ahaid~ thing;M~cdAuhaido~nayc6thEJamngb ~ mQt cachmyy nhungn6cdngg4ykh6khantrongvi~ thittkl chinhxacd1tOng cong.B11'~ngcongOpenB-splinekh>hEhi~n.tinhchitnayviv4yn6thfch hQphootrongvi~thiltkl. 5 7-2-2.Phuongphdpdungvector£liddl di~uchinkvi tri vLMm phuhopcdc di~u/dentaidilmM1!J!.!)dilmcudi. . T6ngquatcacvectorgii naythongthEhi~nlenmanlUnhvakh>hE di~nkhiEnbhlg tay.IDnh(4-53)BovaBn+2Ja haivectorgii ~ diEmd~uva diEmcudicui dU'CJngcong. Tft'(4-101)va(4-102)tac6 Bo Bn+2 Ps-(i ~1)1(N*uBo+N*t,2Bt+ +N*t,t-lBt-2)n~ (4-107) va~ ~m cuditac6 1 C C c Pc (i-I)! (~:N*i,2Bn-t +L N*uBl1-k+S+ +L N*i.tBn+2)A ~ ~ Tatlmdi~uki~ndi du'Ongcongxua'tpMtnrB1vak6tth1ic~ BD+l tli'cIi Ps=BlvaPe=Bn+ltheotren13c6 Bo=«k-l)!-N*t,2)B1-(N*~2+ +N*t.t-lBt-2) ~ (4-109) c c C BJt+t=«k-l)!-L N*i.t-t)Bn+l-(LN*i,2Bn-t+ +L N*J.t-2BJ~ t=t t=t i=I c vdi N*t.l=1vaL N*~l di du'«1CsU-dJplg t=t (4-108) (4-110) 62 Cho k=3 tft'(4-109)va (4-110)thudU'<1CBo=Bl vaBn+2=Bn+lie .9 vectorbQi hai U)ihai d~u Cho k=418c6 Bo=(64)B I-B2=2BI-B2 Bn+2=(6-4)Bn+l-Bn=2Bn+l-Bn lfinh (4-53)minhh~ di~unay IDnh(4-53)DUngvectorgii tJf.ihaidiu cui ctmJngcongUDifonnB-spliBe H B2 BS.../ /' /'./ ./ 5 2 6 10 oX BI I-2 I / / / / / ~5 I /, Eo Figure +-53 PseudoverticescontrolstartandendpointsofperiodicB-splinecurves. 1c=4 B~ohamclp 1va2~haid~ncui dttlJngcongchobill(4-103)va(4-104) 18c6vdi k=3 p9s=112(~-Bo)=112{~-(2B1-B2)}=BrBt p9e=ll2(Bo+rBJ=ll2{2Bo+I-Bn-Bn}=Bn+l-Ba vi v~ytitpmytncuadttCJngcong~haid~nthltrUngvdihai~ d~uvacuOi cwi dagmckiim soat Tu'dng111chok=4 tft'dingthacBovaBO+2ktthw vdi (4-105)va (4-106)18 c6 63 P" s=Bo-2Bt-B2=2Bt-Br2BI+B2=O P" e=Bn+2Bn+1Bn+1=Bn-~n+l+2Bn+l-Bn=O di~unay cht\Ugtode:;xob ~ haidju thlbhg khdng * Ta coth~x~cdinhhaivectorgiaBovaBn+2quavectortiip tnyin ~ hai dju cwi du'CJngcongo nY(4-103) Bo=N: {(k-l)!P',-(N*t-t,2Bl+...oo..+N*t-l.t-lBt-2Hn~ (4-111)k--1,l vanY (4-104)thudtt<;fc 1 H H Bn+2H {(k-l)!P'e- (L (k-l)N*i,2Bn-k+4++L (k-l)N*i,t- L(k -l)N *i,t i=l i=1 i=1 IBn+I)}n~ (4-112) Cho k=4 tac6 Bo=B2-2P', Bn+2=2P'e+Bn E>i~mbAtdju vadi~mkit thuccUadu'<'1ngconIsenh~du'c;1cbhg c~chthay gi~tQnayvao(4-107)va(4-108) * Tu'dngt11tac6th~x~c<ijnhaivectorgiaBovaBn+2quavectord~oham clp 2~i haidju cuadu'CJngcongo nY(4-105)va(4-106) Bo-N*l {(k-l)!I2P"s-(N*t-2,2BI+ +N*t-2.t-lBt-2)}n~ (4-113) !--1,1 Bn+2 H 1 {(k-l)!P"e-(~ (k-l)(k-i-l)N*i,2Bn-k-t4+....... L(k-lXk-i-l) N*i,k i=1 t=1 H +L (k-1Xk-i-l)N*a-lBn+l»)~.(4-114) i=1 Chok=4tac6 Bo=P"s+2B1-~ Bn+~P"e+Bn+l-Bn MQt1Annltadi~mbAtdju vadi~mkit thuccuadn'CJngconise~ du'<jcbhg c~chfhaygi' tQnayvao(4-107)va(4-108)tu'dngtIfvectortilp tnyinnh4n du'<jcbhg eachdUng(4-103)(4-104)vdiBovaB~tu'dng1b1g. 64 4-8.Tundllm Idiot soaitcbo co B e Trongae mq.etru'&tadi banb,eQchxaedPiliphu'dDg<trinhdu'bng conIB-splinequadagiaeIdemsoatcui chUng.Nayvln d~ngttdc,bPdu'<Jcd~t raJa n~ubilt tIu'&:mQts6diemcui dU'CJngconI~u.fa cothexaectpilidu'~ ae dagiaeIdemscatcui du'CJngconI dobaykhoog1Ciu trcil<siJa c6 va du'CJngconI B-spJinexacctplhbdicaediemIdemsOOtnay gQiJa du'CJngconI B-splinethiehhdj)(B-spJinecurvefit ). HmI1(4-55)xacdinhetagUicki&n~t cuidItlJDgcongB-splinequam~86 di&netabi~n1mtteadn'iJDgcong. ._'" B3 B1 B4 N6ucaediembi6ttnt&nhm~n du'~gconIthito:1-dQcuachUngthoa phu'dngtrlnh(4-83) . Vi6t(4-83)ehoj di~mdo ,gQiBi Ia86di~mki~ sootdn tlm Dl(tt)=Nt.itt)Bt+NZ.itl)Bz+ +Ni,itl)Bi ])z(t2)=N1,k(t2)B1+Nz,it2)B2+ +Ni,it2)Bt D~t.J=N1.t<1j)B1+N2.t<1j)Bz++Nj,t<tJBt ddAy2~k ~ n+l::;j Yilt du'did~gmatDJntaco [D]=[N][B] (4-11S) vdi[D]T=l.Dl(tl)Dz(tz)... DJt;)] [B]T=[Bl ~ BJ [ ~1,k(t,.)... Ni,k(t,.) ] [N]=: Nt.,t(tJ)... Ni,k(tj> Nlu 2~k ~ n+l=j thl matr;jn[N]vuOngvaae diemkiemsOOtdu'<Jcxae dP1hbdi [B]=[N]-1[D] (4-116) 6S

Các file đính kèm theo tài liệu này:

  • pdf3.pdf
  • pdf0.pdf
  • pdf1.pdf
  • pdf2.pdf
  • pdf4.pdf
  • pdf5.pdf
Tài liệu liên quan