Incorrect direction for normal using surfnorm(x,y,z)
5 views (last 30 days)
Show older comments
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!
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Map Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!