fabien van mook

all packages "fvm-*"

package "fvm-geometry"

function file "removezeroarea.m"

Function [V,F] = removezeroarea(V,F,tol)
         [V,F] = removezeroarea(V,F,tol,brk)

returns a new triangular mesh after removing triangles 
with (approximate) zero area from the input mesh. 

Note that the no vertices will are removed; for removal
of no anymore used vertices, use function removenonusedvertices()
after function removezeroarea().

Variable V has three columns containing the x,y,z
coordinates, respectively. Each row in V contains
thus a vertex.

Variable F has three columns containing the indices
to the rows in V, representing the three vertices
by which a triangle is defined.

Input variable tol is a real scalar and represents
the limit value of the area of a triangle, above which
the triangle is accepted (in the output).

If a real scalar by input variable brk is given, the 
values in V are rounded off by the magnitude given by
brk. These rounded values are output, and are used to 
calculate the area.

The area of a triangle is calculated by the half 
of the length of the cross product of its first and
last laterals.

The validity of the input is not checked!


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-geometry" under GNU GPLv3+