資源簡介
matlab繪制B樣條曲面的代碼,包括均勻、準均勻、分段Bezier以及非均勻四種類型。main.m是入口函數,輸入控制網格的頂點坐標,曲面的類型以及次數。
代碼片段和文件信息
function?Nik_u?=?baseFunction(i?k??u?NodeVector)
%?計算基函數Nik(u)NodeVector為節點向量
if?k?==?0???????%?0次B樣條
????if?(u?>=?NodeVector(i+1))?&&?(u?????????Nik_u?=?1.0;
????else
????????Nik_u?=?0.0;
????end
else
????Length1?=?NodeVector(i+k+1)?-?NodeVector(i+1);
????Length2?=?NodeVector(i+k+2)?-?NodeVector(i+2);??????%?支撐區間的長度
????if?Length1?==?0.0???????%?規定0/0?=?0
????????Length1?=?1.0;
????end
????if?Length2?==?0.0
????????Length2?=?1.0;
????end
????Nik_u?=?(u?-?NodeVector(i+1))?/?Length1?*?baseFunction(i?k-1?u?NodeVector)?...
????????+?(NodeVector(i+k+2)?-?u)?/?Length2?*?baseFunction(i+1?k-1?u?NodeVector);
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????684??2015-03-11?20:51??matlab繪制B樣條曲面代碼\ba
?????文件????????448??2016-05-01?11:21??matlab繪制B樣條曲面代碼\main.m
?????文件????????445??2016-05-01?11:51??matlab繪制B樣條曲面代碼\Surf_PlotCtrlMesh.m
?????文件???????9644??2016-05-02?11:19??matlab繪制B樣條曲面代碼\Surf_PlotSubMesh.m
?????文件????????689??2015-03-07?19:32??matlab繪制B樣條曲面代碼\U_piecewise_Bezier.m
?????文件????????511??2015-03-04?16:45??matlab繪制B樣條曲面代碼\U_quasi_uniform.m
?????目錄??????????0??2016-05-02?11:25??matlab繪制B樣條曲面代碼
-----------?---------??----------?-----??----
????????????????12421????????????????????7
- 上一篇:A星算法matlab實現
- 下一篇:主成分分析的matlab程序
評論
共有 條評論