1. Trang chủ
  2. » Luận Văn - Báo Cáo

Tính độ cong bề mặt cho phân vùng bề mặt tự do dựa trên phần mềm matlab

6 2 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 294,99 KB

Nội dung

Tgp chi Khoa hgc - Cong nghe Thuy sdn s THONG BAO KHOA HOC TINH DO CONG BE MAT CHO PHAN VUNG BE MAT TLT DO DITATREN PHAN MEM MATLAB SURFACE CURVATURE COMPUTATION FOR FREE-FORM SURFACE PARTITIONING BASED ON MATLAB PROGRAM Nguyen Van Tirdng' Ngay nh?n bai, 05/8/2014; Ngay phan bi?n th6ng qua, 11/8/2014; Ngay duyet dang 01/12/2014 T O M TAT Cd the chia be mat ttr thdnh cdc viing loi lom yen ngua khac nha vdo dac diem dp cong bi mat tai cdc diim tren be mdt Bdi bdo ndy trinh bdy vi^c tinh dg cong ciia bi mgi tyr cho myic dich phdn vitng Cac thong so eong be mdt dugc sU dyng ldm dQ lieu cho qud tnnh phdn vitng vd xdc dinh bien cdc viing su dung cdc dgc tinh hlnh hoc cua bi mat vd ky thudi ma xich ITnh vifc xu ly dnh Qud Irinh tinh todn dugc thuc hi?n nhd chuong trinh dugc viet bdng phdn mem Matlab Dir lieu ddu vao cho chuang trinh Id phucmg trinh todn hge cua be mat tudo d dang tudng minh hogc bi mgt Bspline Tpa dg cdc diem tren be mgt cSng nhu tren bien cua cae vitng dU lieu ddu duac sic dung cho viec mo kinh hda be mgt v&i cdc viing rieng biet mdi truang CAD (Computer Aided Design) Tir khda Be mat tu dg cong be mdt, phdn viing be mgt ABSTRACT A free-form surface can be partitioned into different convex, concave and saddle regions thanks to the characteristics of surface curvatures at points on ihe surface This paper presents Ihe work ofsurface curvature computation for free-form surface partitioning The surface curvatures are used as data for partitioning and defining the boundaries of regions on the surface when using the characteristics of surface geometry and the chain code technique in image processing field The computation process is performed by a Matlab program The input data of the program are mathematical equations of free-form surfaces in explicit form or Bspline surfaces The coordinates of points on the surface and on Ihe region boundaries in the output data are usedfor modelling the surface with separate regions in CAD environment Keywords- Free-form surface, surface curvatures, surface partitioning I DAT V A N D £ Be mgt ty la mgt deu, tran, thudng dugc su dung cdc ngdnh thiet ke va che tgo khuon mau, thiet ke than d td, tdu thdy, mdy bay vd cdc tdc pham nghd thugt Qua trinh gia cdng be mat ty tren mdy CNC (Computer Numerical Control) thudng t i n nhilu thdi gian dudng kinh dao bi hgn che bdi ban kinh eong nhd nhat cCia b l mgt c l n gia cdng Mdt nhCrng phuang phap nang eao nang suat gia cdng be mat t y Id chia b l mgt thdnh cdc vung khde vd mli vung cd the dugc gia edng bang cdc dao ed dudng kinh khde Chen vd es [2] da tinh cdc tinh chat hinh hpc cua b l mdt t y nhu dp cong Gauss, d$ eong trung binh, dp eong cyc dai vd eye tieu vd phap vec ta b l mgt de thdnh ldp mOt vec ta da chilu eho qud trinh chia vung b l mat ty Phuang phdp nhdm cum md (fuzzy clustering) va phuang phdp C-means md (fuzzy C-means) dd dugc ede tdc gid sd dung d l chia be mat ty cac vung 111, Idm va yen ngya Cac tinh chat hinh hpc ndi tren cung dugc Roman vd cs [7 8] de xac djnh bien vd phan vCing b l mgt ty Beyvacdngsy [1]daxdpxibemgttydothanh cdc tam gidc Cdc thong s i phdp vec ta vd dp eong b l mat dugc tinh de xae djnh hinh dgng cue bg vung b l mgt tgi cdc dinh tam gidc Tu dd, ede dinh ndy dugc nhdm cae vung cd hinh khae D l ndng cao hidu suit gia cdng bdng edch su dung dao Idn nhat ed the, Li va Zhang [4] eung chia 'TS NguySn Vdn Tudng; Khoa Co khi-Truing Ogi hpc Nha Trang TRUONG DAI HOC NHA TRANG • 65 So 4/2014 Tgp chi Khoa hoc - Cong nghe Thuy sdn b l mgt ty cdc vung l6i ldm vd ydn ngya nhd dp cong b l mgt Hp ggi cdc viling Idm vd ydn ngya Id nhung vung tdi han md d ed t h i xay vide cat Igm Cdc tdc gid da xdy dyng chuang trinh tinh todn chia vCing vd kilm tra cat Igm bing ngdn ngu C++ Elber vd Cohen [3] da tien hdnh phdn tich d | eong cua b l mgt ty de nghidn edu dgc tinh d l hinh be mgt Hp da phat tnin mgt phuang phap lai su dung ede todn tu ky higu vd todn tu s6 d l tfnh cdc dp cpng be mgt, td xdc djnh bidn cdc dudng bien cua cae vung rieng bigt tren b l mgt Tuy nhien, cac phuang trinh dudng bien Id nhung da thuc bdc eao, rit khd gidi Noi tom Igi, cho din nay, c6 nhilu cdng trinh nghien cdu phdn vung b l mat ty dc dya tren cdeh tilp can dung dp cong be mgt Tuy nhidn da so cdc phuang phdp da dua la khd phuc tap, kho dp dgng Tudng vd Pokomy [9] da dua mpt phuang phdp dan gidn nhung hieu qud d l phan vung be mat ty d ddy, be mat ty dugc chia thdnh eac vCing 111, 16m vd yen ngya dua trdn dp eong t>e mgt Dudng bidn cua cdc vung dugc xdc djnh nhd dp dung ky thudt ma xich diing xu ly dnh Qud trinh tinh toan phan vCing va xdc djnh bien b l mgt dugc thyc hign nhd mpt chuang trinh Matlab dugc vilt cho b l mgt ty d dang tudng minh hogc be mat Bspline Bai bdo tap taing gidl thtgu phuang phdp tinh toan cong be mgt ty cho muc dich phan vung vdi sy h i trg cua phln mim Matlab II D I TU'gNG NGHIDN CtPU VA PHUaNG P H A P NGHIEN CLTU Thong so hinh hpc cua be mat t y B I mgt ty ed t h i dugc bilu dien theo: -Dang an: f(x, y, z) = (1) - Dgng tudng minh z = f(x, y) (2) - Dgng tham so: S(u,v) = {S.(u,v), S/u,v), S^(u,v)} (3) Mgt s i thdng so hinh hpe chu y l u eua be mat ty la: a Phdp vee ta tgi mdt dilm Cho mOt be mgt ty S(u, v) va mpt diem bit k^ tren be mat Tgi dilm ndy, Su vd Sv Id hai vde ta tilp tuyin theo hai phuang tham so u va Su vd Sv khong song song nhau, vd mOt vde ta vuong gde vdi ed hai vde ta Id vee ta dan vj, dugc xae djnh bdi d n g thde (4) va duac bilu diln nhu trdn hinh [6], S xS 66 • TRUONG OAI HOC NHA TRANG Vee ta t bat ky vudng gdc vdi n^ dugc gpi Id vde ta tilp tuyin vdi S(u,v) tgi diem p Mgt phing chua tat ed ede vde ta tiep tuyin vdi mgt S tgi dilm p dugc gpi Id mgt phang tilp tuyin tgi diem p, va dugc k:^ hi$u Id Tp(S) (hinh 1) Hinh l.Phip victo'ainivjviit phing ti^p tuyen tai mgt diem b Dgng todn phuang thu nhat, F1 Dgng todn phuang thd nhat cua mIt be mgi ^F S bilu diln cac tinh chat khoi cda be mat, diroc xae dmh bdi [6]: Fl = dS.dS = Edu^ + 2Fdudv + Gdv^ (5) dd Đ1^ ã F = — • G - — — dudu ' du dv ' dv dv (6) Id eac h# s i cua dgng todn phuang thu nhat e Dgng toan phuang thu hai, F2: Dgng todn phuang thu hai md td dp eong cua mdt b l mgt ty do, dugc xdc dinb bdi [35]: F2= -dnS dS = Ldu^ + 2Mdudv + Ndv^ (7) dd ' du" ' dudv ' av' (8) la cae hg so cua dgng todn phuang thi> hai d GO eong Gauss (K) vd d l cong trung binh (H) Cho mIt b l mdt ty S(u,v) va p la mpt diera bat ky tr§n nd Gpi (Q) la mgt phang ehua phdp v6c ta cua mgt S tgi dilm p Giao tuyin eCla Q Id S la mpt dudng cong cd dp eong nhat djnh (hinh 2) Khi mgt (Q) quay xung quanh phdp vec ta ndi trdn thi dO eong cOa dudng cong thay doi Q-le dd chlnti minh rdng ton tgi ede hudng ma d dd dp cong oia dudng cong dgt dgt gia trj cue tilu vd eye dgi [6] Cdc dp cong d ede hudng ndy duge gpi Id cdc Si, eong chinh tdc vd cdc hydng dp cong chinh tai vudng gdc Tgp chi Khoa hoc - Cong nghe Thuy sdn So 4/2014 Hmh Dg cong cna be mat t u Dp eong Gaussian (K), dO cong tmng binh (H) vd cac dO cong chinh tie K ^ va K ^ cCia b l m§t S(u, v), tgi dilm p, dxiac tinh bang cae edng thue [6]: LN-M= K,„.„K^ EG-F_\_fEN-2FM + GL\ (9) ^^™) (10) (11) (12) Dya vdo ede gia trj cua cong Gauss, dp cong trung binh va ede dp cong ehinh tdc, cac dilm tren mpt be mat ty ed the dugc chia thdnh sdu loai nhu sau [5]: - Diem eliptic Idm: Neu K > va H > - Diem eliptie l6i: Neu K > va H < - Diem hyperbolic: Neu K - Diem parabolic loi: Neu K = va H < - Diem ron phang: Neu K = va H = D l chia mgt be mat ty thdnh cac vCing 111 ( k l ca vung phang), vung lom va vung yen ngya, hinh dang be mat cue ttd quanh mdt dilm cd t h i dugc chia thdnh ba logi vung khde nhu sau [5]: " K > vd H £ 0' hinh dang be mat cue bp loi * K ^ va H > 0: hinh dang be mat cue bp lom * K < va H ' 0: hinh dgng be mat cue bo yen ngya Tinh cong cilia b l mgt ty Trong nghidn euu ndy, thudt todn phdn vung b l mdttydo nhu sau: (a) Tao tap hgp ludi dilm t>l mat {p} tu md hinh toan hpe cua t>e mat S vd luu t i t ca cac cfilm vao mdt ma trdn ehung (b) Tinh cdc thong sd K and H tgi mil dilm p,^ (e) Xet moi diem p^ thudc tdp {p}: - Nlu K > vd H £ 0: luu dilm vdo ma trdn cac dilm vOng loi, md hoa dilm luu thdnh so Cdc ^ e m khdng cd tinh chat ndy dygc ma hda thdnh s6 - Neu K a vd H > 0: luu dilm vdo ma trgn cac dilm viing ldm, ma hda diem lyu thdnh so Cdc dilm khong cd tinh chit ndy duge md hda s6 - Nlu K < 0: luu dilm vao ma trdn eac dilm vung ydn ngya, ma hda dilm luu so Cdc diem khdng cd tinh chit dugc md hda thdnh soO C l u true ma trdn ede viing ndng bidt neu tren tuang ty nhy eau tnJc cOa ma trdn cua anh nhj phdn Dilu ndy tao dieu kien de ddng eho vigc ap dgng ky thudt md xich xu ly dnh d l xdc dinh bien cdc viing da phdn Cac diem bien se dugc dung de xdy dyng cdc dudng cong khdng gian ba ehilu diing eho viee chia be mgt ty cac vung khae mdi tnrdng CAD D l thyc hien tinh todn theo thugt todn ndi tren va can cy cae phuang trinh (9) d i n (12), eac budc de tinh cong cOa mot b l mdt ty dugc thyc hien nhu sau: - Tao tgp hgp cae diem tren b l mat ty da eho - Tinh todn cdc phdp vee ta dan vj tai tat cd ede diem tren be mat - Tinh cac he so dgng toan phuang &iy nhit va thu hai - Tinh dp cong Gaussian, dp cong trung binh va cdc dp cong ehinh tie Trong nghien cuu ndy, vigc tinh todn phdn vung vd xdc djnh bidn cdc vung duac thye hien bdng mot chuang trinh Matlab Chuang trinh gom cae tgp tin M-funetion va M-seript de tgo mo hinh toan cua b l mgt, ti'nh d l cong b l mat, phdn viing vd xdc djnh bien ede viing Ham tinh todn dp (X)ng ed npi dung ca ban nhy sau: - Tinh dao hdm bac nhdt vd dgo ham bgc hai theo cdc bien u va v bdng each su dung hdm tieu chuan gradient [Xu,Xv] = gradlent(X); |Yu,Yv] = gradient(Y); [Zu.Zv] = gradient(Z); [Xuu,Xuv] = gradient(Xu); [Yuu,Yuv] = gradient(Yu); [Zuu,Zuv]= gradient(Zu); p(uv,Xw] = gradient(Xv); [Yuv,Yw] = gradient(Yv); [Zuv,Zw] = gradient(Zv); X, Y vd Z d ddy Id nhung mdng chilu cCia ede dilm trdn b l mdt Nhung mdng ndy phdi duge ehuyen cac vec ta de thyc hien cae phep tinh v l sau TRLfONG OAI HOC NHA TRANG • 67 SS 4/2014 Tgp chi Khoa hoc - Cong ngh? Thuy sdn - Tinh phdp vde ta tgi cdc dilm trdn be m^t: m = cross(Xu,Xv,2); q = sqrt(dot(m,m,2)); - Tinh cae hg s i dang todn phuang thd nhit: E = dot(Xu,Xu,2); F = dot(Xu,Xv,2); - Tfnh cac hg so dang todn phuang thu hai: L = dot(Xuu.n,2): M dot(Xuv.n,2): - Tinh dp cong Gauss: K = (L.*N - M.''2)./(E.'G - R'^2); - Tinh dd cong trung binh: H = (E.-N + G."L - 2.*F.*M),/(2'(E.'G F.^2)); - Tinh dd cong chinh tac: ^,„ = H - sqrt(H.''2 - K); K „ „ = H + sqrt(H.'^2 - K); 111 K^T QUA NGHIDN CU'U VA T H A O LUAN Trong nghidn cuu nay, chuang trinh Matlab dygc viet eho tudng minh hogc b l mdt Bspline Bdi bdo su dyng be mgt ty d dang tudng minh d l minh hoa cho vigc tinh todn dp cong b l mdt Vi d{/: Cho b l mgt tu dugc bilu diln bdi phuang trinh Z " , dd x vd y cd Edit \fiew Graphics > "^ N = dot(Xw,n,2); gia trj dogn [-1,3] Gid su ma trdn dilm lirdl can tgo trdn b l mgt c6 cd la 41 '41 theo hai phuang X vdy Trong nghidn cuu ndy, chuang trinh Matlab dugc chgy trdn mdy tinh xdeh tay (Intel Core 15, ,aOGHz, RAM GB) edi ddt hd dilu hdnh Windows Hinh vd hinh trinh bay k i t qua tinh K, H, K^ va K tgi mdt so dilm ludi \r&n b l mdt ii^eimm • d" File n = m./[q q q]; G = dot(Xv,Xv,2); Fill «»>' 'I Edit View Graphics « | « %lia|lB -[^No »' " m Q K ^ ^ Mo ã' *ằ Edit View i*Wô''*HV*ô*IMBBiei ^\ B - ! ^ N o _ ''I "* «LB B ' ' B M

Ngày đăng: 29/11/2022, 17:29

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w