Rank: 26567 based on downloads (last 30 days) and 0 files submitted
photo

Edward Bender

E-mail
Company/University
The University of Wisconsin-Madison

Personal Profile:

Professional Interests:
2D and 3D image processing, registration

 

Watch this Author's files

 

Comments and Ratings by Edward View all
Updated File Comments Rating
30 Apr 2009 triangulationVolume Compute volume and area of triangulation using divergence theorem of Gauss Author: Jeroen Verbunt

I think I found a way to fix the code. On the line where Gauss' law is used:

vol = vol + abs(P(1) * N(1) * a);

The absolute value there is not correct and should be removed - when the vector field and normal vector are antiparallel the addition to the volume needs to be negative. With the current implementation you can change the volume by shifting the X coordinate. If you get rid of the absolute value everything is fine, so long as you can ensure that the normals on the surface point OUT. Although the addition of the absolute value seems intuitive, it is not how Gauss's law works.

The normals can be computed with another code on the filie exchange: computeNormalVectorTriangulation by David Gingras. David's code will give you normals that point outwards so long as the triangles are defined in a certain way... Refer to his code.

This update seems to give the right volume and remove the dependence on translation of vertices, at least in my testing.
 
-Ed

30 Apr 2009 Compute normal vectors of 2.5D triangulation That function compute the normal vectors of a 2.5D triangulation. Author: David Gingras

Worked perfectly the first time. A+!

24 Apr 2009 Triangular Mesh Refinement This function refines any closed triangular mesh with 4-split spline interpolation Author: Dirk-Jan Kroon

This is an excellent file that does exactly what it says it does. It worked the first time. I don't know why someone else gave it a bad rating - I think it's perfect as is.

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com