フィルターのクリア

splitting a shape into triangles

2 ビュー (過去 30 日間)
Nasser Ramsis
Nasser Ramsis 2016 年 12 月 21 日
コメント済み: José-Luis 2016 年 12 月 21 日
Hello,
I'm writing a code to optimize some dimensions for a wing i'm designing. As part of the code i need to split up a 2D airfoil into triangles. I used a Delaunay triangulation and all the points are connected to 1 point. This is the code segment so far:
chord = 0.25;
nacanum = 12;
t = nacanum/100;
x=0:0.01:chord;
distratio = x/chord;
yt = 5*t*(0.2969*sqrt(distratio)-0.126*distratio-0.3516*distratio.^2+0.2843*distratio.^3-0.1015*distratio.^4);
at=delaunayTriangulation(x',yt');
tr=delaunay(x,yt);
triplot(at,x,yt);
triplot(tr,x,yt);
using delaunay and delaunay triangulation seem to plot the same figure but they appear somewhat different in the workspace can anyone explain what the difference is?
Also, all the points are connected to an origin point (1)
how can i change that? as in I want it to create the triangles side by side sharing only 1 or 2 points as opposed to all the triangles sharing an origin point. ( i hope that makes sense)
Thanks in advance
  3 件のコメント
Nasser Ramsis
Nasser Ramsis 2016 年 12 月 21 日
I realized the delaunay functions just number the points and connect them (i think). so i wrote this segment to create the same numbering but it wont plot.
for i=1:1:length(x)
for j= 1:1:3
tr(i,j)= i-1;
end
end
for i=1:1:length(x)
tr(i,3)=i;
end
José-Luis
José-Luis 2016 年 12 月 21 日
I don't understand. What are you trying to accomplish here? Did you try what KSSV suggests?

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2016 年 12 月 21 日
There is no difference between the two, they differ only in the way how the output is. Both of them creates nodal connectivity matrices and coordinates similar. In order to mesh your wing I suggest you to go through the following file exchange, which gives extra ordinary unstructured meshing.

カテゴリ

Help Center および File ExchangeDelaunay Triangulation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by