Path: news.mathworks.com!not-for-mail 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$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1270586004 24618 172.30.248.37 (6 Apr 2010 20:33:24 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Tue, 6 Apr 2010 20:33:24 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 2301598 Xref: news.mathworks.com comp.soft-sys.matlab:624043 Hey, 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..) Thanks, Li