{"id":739,"date":"2017-12-28T23:36:48","date_gmt":"2017-12-28T15:36:48","guid":{"rendered":"http:\/\/www.whudj.cn\/?p=739"},"modified":"2017-12-28T23:36:49","modified_gmt":"2017-12-28T15:36:49","slug":"nurbs-%e9%9d%9e%e5%9d%87%e5%8c%80%e6%9c%89%e7%90%86b%e6%a0%b7%e6%9d%a1","status":"publish","type":"post","link":"http:\/\/www.whudj.cn\/?p=739","title":{"rendered":"NURBS-\u975e\u5747\u5300\u6709\u7406B\u6837\u6761"},"content":{"rendered":"<p>\u672c\u7cfb\u5217\u7684\u4e3b\u9898\u662f\u201cNURBS\u201d\uff0c\u4f46\u662f\u5927\u90e8\u5206\u7bc7\u5e45\u96c6\u4e2d\u4e0eBezier(B Spline\u7684\u7279\u6b8a\u5f62\u5f0f)\uff0cB Spline\u3002\u4e4b\u6240\u4ee5\u8fd9\u4e48\u5b89\u6392\uff0c\u662f\u56e0\u4e3aNURBS\u4e0eB\u6837\u6761\u53ef\u4ee5\u8f7b\u677e\u7684\u4e92\u76f8\u8f6c\u6362\uff0cB\u6837\u6761\u7684\u8ba1\u7b97\u65b9\u6cd5\uff0c\u5747\u53ef\u4ee5\u5e94\u7528\u5230NURBS(\u975e\u5747\u5300\u6709\u7406B\u6837\u6761)\u4e0a\u3002<!--more--><\/p>\n<p><strong>1\uff09\u63d0\u51faNURBS\u7684\u52a8\u673a<\/strong><\/p>\n<p>\u6211\u4eec\u4e4b\u524d\u5df2\u7ecf\u63d0\u5230\uff0cB\u6837\u6761\u662f\u5206\u6bb5\u7684\u591a\u9879\u5f0f\u51fd\u6570\u3002\u5728\u8bbe\u8ba1\u4e0a\uff0cB\u6837\u6761\u7684\u5e94\u7528\u5341\u5206\u5e7f\u6cdb\uff0c\u4f46\u662f\uff0cB\u6837\u6761\u5374\u4e0d\u80fd\u8868\u8fbe\u6240\u6709\u7684\u66f2\u7ebf\u7c7b\u578b\uff0c\u6bd4\u5982\u8bf4\u5706\u3001\u692d\u5706\u3001\u53cc\u66f2\u7ebf\u7b49\u3002\u5982\u4e0b\u56fe\uff0c\u4ece\u5de6\u81f3\u53f3\u662f\u5229\u7528\u9636\u6570\u4e3a2,3,510\u6b21B\u6837\u6761\u66f2\u7ebf\u62df\u5408\u5706\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u968f\u7740\u66f2\u7ebf\u9636\u6b21\u589e\u9ad8\uff0c\u66f2\u7ebf\u8d8a\u6765\u8d8a\u201c\u5706\u201d\uff0c\u4f46\u662f\u5373\u4f7f\u662f10\u6b21\u66f2\u7ebf\u4ecd\u7136\u4e0d\u80fd\u7cbe\u786e\u7684\u8868\u8fbe\u5706\u3002\u4e3a\u4e86\u8868\u8fbe\u8fd9\u4e9b\u66f2\u7ebf\u7c7b\u578b\uff0c\u9700\u8981\u5c06\u65e0\u7406B\u6837\u6761\u66f2\u7ebf\u6269\u5c55\u5230\u6709\u7406B\u6837\u6761\u66f2\u7ebf\u7684\u5f62\u5f0f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-740\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2017\/12\/bspline_approximate_circle.png\" alt=\"\" width=\"502\" height=\"120\" \/><\/p>\n<p><strong>2\uff09\u5b9a\u4e49<\/strong><\/p>\n<p>\u5c06B\u6837\u6761\u7684\u63a7\u5236\u70b9P\u5199\u6210\u9f50\u6b21\u5750\u6807(homogeneous coordinates)\u5f62\u5f0f\uff1a$$P_i^w=<br \/>\n\\begin{bmatrix}<br \/>\nw_ix_i\\\\<br \/>\nw_iy_i\\\\<br \/>\nw_iz_i\\\\<br \/>\nw_i<br \/>\n\\end{bmatrix}$$B\u6837\u6761\u7684\u5b9a\u4e49\u5c31\u662f$$C(u)=\\sum_{i=0}^nN_{i,p}P_i=\\begin{bmatrix}<br \/>\n\\sum w_iN_{i,p}x_i\\\\<br \/>\n\\sum w_iN_{i,p}y_i\\\\<br \/>\n\\sum w_iN_{i,p}z_i\\\\<br \/>\n\\sum w_iN_{i,p}<br \/>\n\\end{bmatrix}$$\u5c06\u9f50\u6b21\u5750\u6807\u8f6c\u6362\u4e3a\u7b1b\u5361\u5c14\u5750\u6807\uff0c\u5c31\u662f\u8bb2\u4e0a\u8ff0\u8868\u8fbe\u5f0f\u76844\u4e2a\u5750\u6807\u540c\u65f6\u9664\u4ee5\u7b2c\u56db\u7ef4\u5750\u6807\uff1a$$C(u)=<br \/>\n\\frac{1}{\\sum_{i=0}^nw_iN_{i,p}}\\sum_{i=0}^nN_{i,p}w_i<br \/>\n\\begin{bmatrix}<br \/>\nx_i\\\\<br \/>\ny_i\\\\<br \/>\nz_i\\\\<br \/>\n1<br \/>\n\\end{bmatrix}=<br \/>\n\\frac{1}{\\sum_{i=0}^nw_iN_{i,p}}\\sum_{i=0}^nN_{i,p}w_iP_i<br \/>\n$$\u5c31\u662fNURBS(Non Uniform Relational B Spline \u975e\u5747\u5300\u6709\u7406B\u6837\u6761)\u7684\u5b9a\u4e49\u3002<\/p>\n<p>\u76f8\u5bf9\u4e8eB\u6837\u6761\uff0cNurb\u6bcf\u4e2a\u63a7\u5236\u70b9\u5747\u6709\u5bf9\u5e94\u7684\u6743\u91cd\\(w_i\\)\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\\(w_i\\)\u4e3a\u6b63\u6570\uff0c\u5f53\u6743\u91cd\u4e3a0\u7684\u65f6\u5019\uff0c\u63a7\u5236\u70b9\\(P_i\\)\u5bf9\u66f2\u7ebf\u7684\u5f62\u72b6\u5b8c\u5168\u6ca1\u6709\u5f71\u54cd\uff0c\u8fd9\u4e2a\u63a7\u5236\u70b9\u79f0\u4e3a\u201cinfinite\u201d\u63a7\u5236\u70b9\uff0c\u6709\u7279\u6b8a\u7684\u5e94\u7528\u3002\u800c\u4e14\uff0c\u53ef\u4ee5\u89c2\u5bdf\u5230\uff0cNURBS\u7684\u5b9a\u4e49\u4e3a\u6709\u7406\u66f2\u7ebf(\u4e24\u4e2a\u5173\u4e8eu\u7684p\u6b21\u591a\u9879\u5f0f\u7684\u5546\u7684\u5f62\u5f0f)\u5f62\u5f0f\u3002<\/p>\n<p><strong>3\uff09NURBS\u4e0eB\u6837\u6761\u7684\u76f8\u4e92\u8f6c\u6362<\/strong><\/p>\n<p>\u4eceB\u6837\u6761\u5f15\u5165NURBS\u7684\u5b9a\u4e49\uff0c\u6211\u4eec\u80fd\u591f\u5f97\u51fa\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u7ed3\u8bba\uff0c\u5982\u679c\u5c06\u63a7\u5236\u70b9\u9f50\u6b21\u5750\u6807\\([w_ix_i,w_iy_i,w_iz_i,w_i]^T\\)\u89c6\u4e3a\u56db\u7ef4\u5750\u6807\uff0c\u90a3\u4e48\u4e09\u7ef4\u7a7a\u95f4\u4e2d\u7684NURBS\u4e0a\u7684\u4e00\u4e2a\u70b9\\(C(u)\\),\u5176\u5b9e\u662f\u56db\u7ef4\u7a7a\u95f4\u4e2d\u63a7\u5236\u70b9\u5e8f\u5217\\(\\begin{bmatrix}w_iP_i\\\\w_i\\end{bmatrix}\\)\u6784\u6210\u7684B\u6837\u6761\u5728w=1\u4e0a\u7684\u6295\u5f71\u3002\u4e0b\u56fe\u662f\u51e0\u4f55\u89e3\u91ca\uff0c\u53ef\u89c1\\((x,y,w)\\)\u5728\\(w=1\\)\u5e73\u9762\u4e0a\u7684\u6295\u5f71\u4e3a\\((\\frac{x}{w},\\frac{y}{w},1)\\)\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-748\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2017\/12\/homo.jpg\" alt=\"\" width=\"320\" height=\"240\" \/><\/p>\n<p>\u603b\u7ed3\u4e00\u4e0b\uff1a<\/p>\n<ul>\n<li>\u7531\\(w_iP_i\\)\u5b9a\u4e49\u7684NURBS\u66f2\u7ebf\u4e3a\u56db\u7ef4\u63a7\u5236\u70b9\u00a0\\(\\begin{bmatrix}w_iP_i\\\\w_i\\end{bmatrix}\\)\u5b9a\u4e49\u7684B\u6837\u6761\u5728\\(w=1\\)\u4e0a\u7684\u6295\u5f71\u3002<\/li>\n<li>\u5f53\u6240\u6709\u63a7\u5236\u70b9\u7684\u6743\u91cd\u5747\u4e3a1\u65f6\uff0c\\(\\sum N_{i,p}w_i=\\sum N_{i,p} =1\\)(B\u6837\u6761\u57fa\u51fd\u6570\u7684\u6027\u8d28)\uff0c\\(\\frac{1}{\\sum_{i=0}^nw_iN_{i,p}}\\sum_{i=0}^nN_{i,p}w_iP_i=\\sum_{i=0}^nN_{i,p}P_i\\)\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0cB\u6837\u6761\u662f\u6743\u91cd\u5747\u4e3a1\u7684NURBS\u3002<\/li>\n<\/ul>\n<p><strong>4\uff09NURBS\u66f2\u7ebf\u7684\u6027\u8d28<\/strong><\/p>\n<p>\u4f5c\u4e3aB\u6837\u6761\u7684\u4e00\u822c\u5f62\u5f0f\uff0cNURBS\u4e0eB\u6837\u6761\u7684\u5927\u90e8\u5206\u6027\u8d28\u90fd\u662f\u76f8\u540c\u7684\u3002\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u900f\u89c6\u53d8\u6362\u7684\u4e0d\u53d8\u6027\u3002B\u6837\u6761\u4ec5\u652f\u6301\u4eff\u5c04\u53d8\u6362\u7684\u4e0d\u53d8\u6027\uff0cNURBS\u66f4\u662f\u589e\u52a0\u4e86\u5bf9\u900f\u89c6\u53d8\u6362\u7684\u4e0d\u53d8\u6027\uff0c\u8fd9\u4f7f\u5f97NURBS\u5728\u8ba1\u7b97\u673a\u56fe\u5f62\u3001\u89c6\u89c9\u3001\u52a8\u753b\u65b9\u9762\u7684\u5e94\u7528\u53ca\u5176\u5e7f\u6cdb\uff1a\u4eba\u773c\u7684\u89c6\u89d2\u89c2\u5bdf\u5230\u7684\u76ee\u6807\u90fd\u662f\u7ecf\u8fc7\u900f\u89c6\u53d8\u6362\u7684\u3002\u5f53\u7136\uff0c\u900f\u89c6\u53d8\u6362\u6539\u53d8\u4e86\u6743\u91cd\u3002\u5173\u4e8e\u900f\u89c6\u53d8\u6362\u4e0e\u4eff\u5c04\u53d8\u6362\u3002\u53ef\u4ee5\u53c2\u8003Dr.shene\u7684\u8bfe\u4ef6<a href=\"http:\/\/pages.mtu.edu\/~shene\/COURSES\/cs3621\/NOTES\/geometry\/geo-tran.html\">Geometric Transforms<\/a>\u3002<\/p>\n<p><strong>5\uff09NURBS\u66f2\u7ebf\u7684\u8ba1\u7b97<\/strong><\/p>\n<p>\u6839\u636eNURBS\u7684\u5b9a\u4e49\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06NURBS\u66f2\u7ebf\u770b\u505a\u56db\u7ef4B\u6837\u6761\u5728\\(w=1\\)\u4e0a\u7684\u6295\u5f71\uff0c\u56e0\u6b64\uff0c\u6240\u6709\u9488\u5bf9NURBS\u7684\u8ba1\u7b97\uff08\u6b63\u7b97\uff0c\u4e0d\u8ba8\u8bba\u63d2\u503c\u3001\u62df\u5408\u7b49\u95ee\u9898\uff09\uff0c\u90fd\u53ef\u4ee5\u7528\u4e09\u6b65\u89e3\u51b3\uff1a<\/p>\n<p>\u6784\u9020\u63a7\u5236\u70b9\u4e3a\\(\\begin{bmatrix}w_iP_i\\\\w_i\\end{bmatrix}\\)\u7684\u56db\u7ef4B\u6837\u6761\u3002<\/p>\n<p>\u5728\u56db\u7ef4B\u6837\u6761\u4e0a\u8fdb\u884c\u8ba1\u7b97\uff0c\u5982\u6c42\u503c\u3001\u6c42\u5bfc\u6570\u3001\u6253\u65ad\u7b49\u7b49\uff0c\u5f97\u5230\u7ed3\u679c(\u56db\u7ef4)\u3002<\/p>\n<p>\u5c06\u7ed3\u679c\u6295\u5f71\u5230\\(w=1\\)\u4e0a\uff0c\u5373\u524d\u4e09\u7ef4\u9664\u4ee5\u7b2c\u56db\u7ef4\uff0c\u5f97\u5230\u4e09\u7ef4\u5750\u6807\uff0c\u5373\u662fNURBS\u6240\u6c42\u70b9\u3002<\/p>\n<p><strong>6\uff09\u4fee\u6539\u6743\u91cd<\/strong><\/p>\n<p>\u89c2\u5bdfNURBS\u66f2\u7ebf\u7684\u7684\u57fa\u51fd\u6570\uff1a$$R_{i,p}=\\frac{N_{i,p}w_i}{\\sum_{j=0}^nN_{j,p}w_j}$$\u53ef\u4ee5\u770b\u51fa\u6765\uff0c\u5982\u679c\u589e\u52a0\\(w_i\\)\u7684\u503c\uff0c\u90a3\u4e48\\(R_{i,p}\\)\u7684\u503c\u4e00\u5b9a\u4f1a\u589e\u52a0\uff0c\u6240\u4ee5\uff0c\u66f2\u7ebf\u4f1a\u66f4\u5411\u63a7\u5236\u5355\\(P_i\\)\u9760\u62e2\u3002\u53cd\u4e4b\uff0c\u5982\u679c\u51cf\u5c0f\\(w_i\\)\u7684\u503c\uff0c\u90a3\u4e48\u66f2\u7ebf\u4f1a\u66f4\u52a0\u758f\u79bb\u63a7\u5236\u70b9\\(P_i\\)\u3002\u4e3a\u4e86\u5b9a\u91cf\u7684\u89c2\u5bdf\uff0c\u53ef\u4ee5\u6307\u5b9a\u63a7\u5236\u70b9\\(P_k\\)\u7684\u60c5\u51b5\uff1a<\/p>\n<p>$$C(u) = \\frac{N_{k,p}w_kP_k+\\sum_{i\\neq k}^nN_{i,p}w_iP_i}<br \/>\n{N_{k,p}w_k+\\sum_{i\\neq k}^nN_{i,p}w_i}$$\u4e3a\u4e86\u7b80\u5316\u8868\u8fbe\uff0c\u4ee4\uff1a$$A=N_{k,p}w_k \\\\<br \/>\nB=\\sum_{i\\neq k}^nN_{i,p}w_i\\\\<br \/>\nX=\\sum_{i\\neq k}^nN_{i,p}w_iP_i$$\u539f\u5f0f\u53d8\u4e3a$$C(u)=\\frac{AP_k+X}{A+B}$$<\/p>\n<p>\u5047\u8bbe\u5f53\\(w=0\\)\u65f6\u7684\u66f2\u7ebf\u4e3a\\(C^0(u)\\)\u90a3\u4e48\\(w\\neq 0\\)\u65f6\u7684\u66f2\u7ebf\u7684\u76f8\u6bd4\\(C^0(u)\\)\u7684\u4f4d\u79fb\u4e3a\uff1a$$C(u)-C^0(u)=\\frac{AP_k+X}{A+B}-\\frac{X}{B}=<br \/>\n\\frac{A}{A+B}(P_k-\\frac{X}{B})=<br \/>\n\\frac{A}{A+B}(P_k-C^0(u))$$\u8fd9\u4e5f\u4f50\u8bc1\u4e86\u5f53w\u589e\u5927\u65f6\uff0c\u66f2\u7ebf\u8fdc\u79bb\u539f\u66f2\u7ebf\u800c\u66f4\u9760\u8fd1\u63a7\u5236\u70b9\uff0c\u800c\u4e14\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u66f2\u7ebf\u7684\u4f4d\u79fb\u5411\u91cf\u4e0e\u539f\u66f2\u7ebf\u4e0a\u70b9\\(C^0(u)\\)\u5230\u63a7\u5236\u70b9\\(P_k\\)\u7684\u5411\u91cf\u540c\u65b9\u5411\uff0c\u5e76\u4e14\u6a21\u957f\u4e3a\u540e\u8005\u7684\\(\\frac{A}{A+B}\\)\u500d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-767\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2017\/12\/weight-change-scheme.jpg\" alt=\"\" width=\"288\" height=\"286\" \/><\/p>\n<p>\u5bf9\u7167\u4e0a\u56fe\uff0c\u5f53\\(w_4=0\\)\u65f6\uff0c\u5bf9\u5e94\u7684\u66f2\u7ebf\u4e3a\u9ed1\u8272\u7ebf(\u7ea2\u5b57\u6807\u8bc60)\uff0c\u5f53\\(w_4\\)\u4f9d\u6b21\u4ece1,2,3,4,5,10,20\u523050\u589e\u957f\u65f6\uff0c\u5206\u522b\u7528\u4e0d\u540c\u989c\u8272\u7684\u7ebf\u7ed8\u5236\u51fa\u5bf9\u5e94\u7684NURBS\u66f2\u7ebf\u3002\u53ef\u4ee5\u89c2\u5bdf\u5230\uff1a<\/p>\n<p>1\uff09\u5f53\u6743\u91cd\u4e0d\u65ad\u589e\u5927\u65f6\uff0c\u66f2\u7ebf\u8d8a\u6765\u8d8a\u5411\u63a7\u5236\u70b9\\(P_4\\)\u9760\u62e2\u3002<\/p>\n<p>2\uff09\u5bf9\u4e8e\u4e0d\u540c\u7684w,\u89c2\u5bdf\u540c\u4e00\u70b9\\(C(u=\\frac{1}{3})\\)\u4e0e\\(C(u=\\frac{2}{3})\\)(\u5de6\u53f3\u4e24\u4fa7\u7684\u9ec4\u8272\u70b9)\uff0c\u4ed6\u4eec\u5747\u5728\\(C^0(\\frac{1}{3})\\)\u4e0e\\(P_4\\)\u3001\\(C^0(\\frac{2}{3})\\)\u4e0e\\(P_4\\)\u7684\u8fde\u7ebf\u4e0a\u3002<\/p>\n<hr \/>\n<p>\u53c2\u8003\u6587\u6863\uff1a<\/p>\n<p><a href=\"http:\/\/pages.mtu.edu\/~shene\/COURSES\/cs3621\/NOTES\/\">Introduction to Computing with Geometry<\/a> 7.1~7.5\u8282<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7cfb\u5217\u7684\u4e3b\u9898\u662f\u201cNURBS\u201d\uff0c\u4f46\u662f\u5927\u90e8\u5206\u7bc7\u5e45\u96c6\u4e2d\u4e0eBezier(B Spline &hellip; <a href=\"http:\/\/www.whudj.cn\/?p=739\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"_links":{"self":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/739"}],"collection":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=739"}],"version-history":[{"count":29,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions"}],"predecessor-version":[{"id":771,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions\/771"}],"wp:attachment":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=739"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}