# How can you avoid thin triangles in a parametric shape in a smart way?

I have created a closed 3D mesh using a parametric function. The shape is constructed by taking an arbitrary closed b-spline and scaling it based on one of the parameters (similar idea to a parametric sphere, except that rather than drawing circles it's a b-spline)

My current problem is, although I can generate the geometry of the shape just fine, it often results in thin triangles for many shapes. And these thin triangles in turn lead to numerical errors when trying to compute the normal to the triangles that make up the shape.

An easy way to avoid having thin triangles is just to just increase the number of samples you do along the parameters.

e.g you can do 20 calculation steps along both u and v, or you can do 100.

More samples usually leads to thicker triangles in almost every parametric shape. The issue of doing it this way is that I also increase the triangle and vertex count.

Assuming I cannot modify the mesh once it is generated, is there a way to sample the parametrization such that I can get thicker triangles with few samples?

• A screenshot would be helpful. It sounds like the problem is the triangles are much longer along u than v (or vice versa)? Are you able to set two different sampling rates for u and v, or do they need to be the same rate? Dec 11, 2018 at 23:41
• I can't take pictures of this :p Dec 11, 2018 at 23:54
• @NathanReed Sampling for u and v can be any integer number, independently of one another. The main issue however is finding a procedure to sample the vertices that doesn't add too many extra samples but rather uses the samples more effectively to avoid thin geometry. Dec 11, 2018 at 23:56
• When you say "thicker" triangles, do you just mean that the triangles are more "equilateral" in shape (albeit smaller in area?). Could you instead generate an initial mesh with a large number of samples and then do a post process to reduce the number of triangles such that you discourage the choice of long/thin triangles? Dec 12, 2018 at 9:14
• Yes I mean trying to find more "equilateral" triangles. Post processing is a possibility, but since ti would add algorithmic complexity and runtime it's less ideal. Dec 12, 2018 at 14:54