From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: How to find (and plot) surface normal
Date: Tue, 6 Apr 2010 20:33:24 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <hpg5qk$o1a$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1270586004 24618 (6 Apr 2010 20:33:24 GMT)
NNTP-Posting-Date: Tue, 6 Apr 2010 20:33:24 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2301598
Xref: comp.soft-sys.matlab:624043


I have a 3D point cloud.
I need to create a surface mesh and find the normal vector to each vertex. 

I wrote a very naive method that:
-- finds the normal vector of each triangle in the mesh
-- finds the neighboring trinagles of each vertex
-- returns the sum of all the neighbors' noramls as the vertex normal  

My questions are:
1. Is this correct? Is there a better way to find the surface normal?
2. How can I plot the result so I can see the whole mesh with its normals?
    I use "trisurf" to plot the mesh, but I don't know how to add the normal vectors..
(sorry if this is trivial, I'm quite new with matlab..)