topics - functions - index - search

mesh_refine_tri4.m

[ FV ] = mesh_refine_tri4( FV )
FV.vertices - mesh vertices (Nx3 matrix)
FV.faces - faces with indices into 3 rows
of FV.vertices (Mx3 matrix)
For each face, 3 new vertices are created at the
triangle edge midpoints. Each face is divided into 4
faces and returned in FV.
See also: mesh_refine, sphere_tri, sphere_project
NOTE
This can be done until some minimal distance (D) of the mean
distance between vertices of all triangles is achieved. If
no D argument is given, the function refines the mesh once.
Alternatively, it could be done until some minimum mean
area of faces is achieved. As is, it just refines once.
The centroid is located one third of the way from each vertex to
the midpoint of the opposite side. Each median divides the triangle
into two equal areas; all the medians together divide it into six
equal parts, and the lines from the median point to the vertices
divide the whole into three equivalent triangles.
Each input triangle with vertices labelled [A,B,C] as shown
below will be turned into four new triangles:
Make new midpoints
a = (A+B)/2
b = (B+C)/2
c = (C+A)/2
B
/\
/ \
a/____\b Construct new triangles
/\ /\ [A,a,c]
/ \ / \ [a,B,b]
/____\/____\ [c,b,C]
A c C [a,b,c]