2011-09-14 18 views
4

這是一個data file與3D點集羣。現在我們可以形成一個BSpline表面。關於BSpline的問題

dat=Import["C:\\Users\\Andy\\Desktop\\Foil.mat"]; 
surface=BSplineFunction[dat]; 
ParametricPlot3D[surface[x,y], {x, 0, 1}, {y, 0, 1}, 
       MaxRecursion->4,Axes->None,Mesh->All,Boxed->False] 

現在我們可以看到結構。但問題是我想製作一個三維實體,而這個結構實際上有兩個可見的孔。

enter image description here

在接下來的圖片我們可以看到,在兩個角是開放的,結構不牢固,但實際上空洞。

enter image description here

於是我想出了我確信可以在視覺上工作,但不返回固體結構的解決方案。

pic=Show[Graphics3D[ 
     {Polygon[Table[surface[0,y],{y,0,1,0.005}]], 
     Polygon[Table[surface[1,y],{y,0,1,.005}]]}], 
     ParametricPlot3D[surface[x,y],{x,0,1},{y,0,1}, 
      MaxRecursion-> 4,PlotPoints-> 20, 
      Mesh-> All],Boxed->False,Axes-> None]; 

GraphicsGrid [ {{ParametricPlot3D [表面[X,Y],{X,0,1},{Y,0,1}, PlotPoints-> 20,Mesh->全部,Boxed- > [假,軸 - >無], Graphics [ ,0,1,.005}]]}], pic}}]

這裏輸出。 enter image description here

現在我們導出第三張圖像,其中孔被視爲封閉的* .obj文件。我們可以在任何基於CAD的網格編輯器(如Meshlab)中導入該文件。有人可以看到要檢測到的孔。

enter image description here

現在有一個簡單的方法,使我們可以形成一個數學固體結構與在Foil.mat文件給出的數據點。我希望在BSpline函數中可以使用一些選項來實現這一點。正如人們所期望的那樣,我希望有一個沒有孔的封閉表面。

希望我已經能夠明確地解釋我的問題了。將等待您的回覆。

BR

回答

4

您可能想要探索TetGenLink,在數學一 「隱藏功能」。從幫助

TetGen is a quality tetrahedral mesh generator and a three-dimensional 
Delaunay triangulator. 
TetGenLink is a Mathematica application that uses Wolfram Library Link 
to link to TetGen functions. It is used automatically by Mathematica for 
various operations such as interpolation in three-dimensional convex domains. 
However, it can also be used directly where it gives a flexible and innovative 
way to use the functionality of TetGen. 

圖片:

enter image description here

+1

這難道不應該被保密? –

+1

聽起來像另一個社區wiki的無證東西的時間:) – Verbeia

+1

@Verbeia奇怪的是,它被記錄(在幫助搜索對話框中輸入'TetGenLink/tutorial/Overview')。問題在於文檔沒有被任何其他幫助頁面集成/鏈接。 –