0

I have two triangulated meshes m and m1 with the following properties:

m_faces: 16640
m_points: 49920
m_surface_area: 178.82696989147524

m1_faces: 8
m1_points: 24
m1_surface_area: 1.440205667851934

Now I would like to subdivide m1 so that it has approx. the same faces number as m, i.e. 16640. I am using the vtk library and more specifically the vtkAdaptiveSubdivisionFilter() function which according to the description:

…is a filter that subdivides triangles based on maximum edge length and/or triangle area.

My question is how to compute the maximum edge length, according to some trial and error I found that this needs to be a value between [0.0188-0.0265] which gives me 16384 faces. However, I couldn’t find any formulation that gives a number in this ratio range and is consistent on different cases. Any idea how to calculate this maximum edge length each time?

On another example I have the following two meshes:

Sph1_faces: 390
Sph1_points: 1170
Sph1_surface_area: 1.9251713393584104

Sph2_faces: 1722
Sph2_points: 5166
Sph2_suface_area: 10.59400389764954

And for getting Sph1 number of faces close to Sph2 number of faces the maximum edge length should be between [0.089-0.09] which gives me 1730 faces for Sph1.

I've tried to use the equilateral triangle area formulation making the corresponding assumption and then solving for side and dividing by number of faces or points but it didn't seem to work. Thus, any other idea would be appreciated.

Thanks.

ttsesm
  • 917
  • 5
  • 14
  • 28
  • 1
    I fear, it is very hard to predict the outcome of such an adaptive algorithm. Especially if your input is highly irregular. And more importantly because the documentation does not state what algorithm is used. But your approach of using an equilateral assumption seems reasonable (as this is usually one of the goals of subdivision algorithms). For your examples, I get edge lengths of `0.01413` and `0.05081`, respectively, which is not too far from your intervals. Aren't the results you get with these numbers satisfactory? – Nico Schertler May 24 '21 at 06:09
  • I think you are right it is really hard to make it work consistently. No the numbers to work according to my needs need to be between the ranges that I provide. In any case I gave up on the `vtkAdaptiveSubdivisionFilter()` after applying different things. Now my alternative workaround was to use the `vtkLinearSubdivisionFilter()` up to a number of faces which is larger to the amount that I want and then decimate back down to the exact number. For now this seems to work fine. – ttsesm May 24 '21 at 08:26

0 Answers0