Incorrect direction for normal using surfnorm(x,y,z)

5 ビュー (過去 30 日間)
Jack
Jack 2014 年 8 月 20 日
コメント済み: Jack 2014 年 8 月 20 日
Im currently working on a vortex lattice code for my thesis and am having issues with the way the MATLAB function [] = surfnorm(x,y,z) produces normal vectors. I have since chosen to use the plane equation for this purpose but was interested in knowing if anyone has had a similar issue or if there is something stupid i've done.
Essentially, I want to produce the normal vector to the surface of a wing with an airfoil camber line describing the z-plane. When entering the x,y,z grid coordinates, surfnorm produces the vectors in the opposite direction (pointing inwards, rather than pointing outwards).
Here are the x,y,z coordinates for an example of a simple, unswept wing with no taper, twist or dihedral.
x =
0 0 0 0 0 0
0.3333 0.3333 0.3333 0.3333 0.3333 0.3333
0.6667 0.6667 0.6667 0.6667 0.6667 0.6667
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
y =
0 0.6000 1.2000 1.8000 2.4000 3.0000
0 0.6000 1.2000 1.8000 2.4000 3.0000
0 0.6000 1.2000 1.8000 2.4000 3.0000
0 0.6000 1.2000 1.8000 2.4000 3.0000
z =
0 0 0 0 0 0
0.0194 0.0194 0.0194 0.0194 0.0194 0.0194
0.0160 0.0160 0.0160 0.0160 0.0160 0.0160
0 0 0 0 0 0
Attached is an image of what happens when surfnorm is used.
Thanks for your help!

採用された回答

Björn
Björn 2014 年 8 月 20 日
Try surfnorm(x',y',z').
  1 件のコメント
Jack
Jack 2014 年 8 月 20 日
Thanks very much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMap Display についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by