<p>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)</p>

<p>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.</p>

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

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

<p>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.</p>

<p>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?</p>

CC BY-SA 4.0
2018-12-11T23:41:43.850Z
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?
Nathan Reed
CC BY-SA 4.0
2018-12-11T23:54:08.697Z
I can't take pictures of this :p
Makogan
CC BY-SA 4.0
2018-12-11T23:56:20.870Z
@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.
Makogan
CC BY-SA 4.0
2018-12-12T09:14:56.727Z
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?
Simon F
CC BY-SA 4.0
2018-12-12T14:54:48.477Z
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.
Makogan
CC BY-SA 4.0
2018-12-12T16:11:03.603Z
Just to get it clear in my head you want a) a simple grid-like subdivision of the parametric space so that there is minimal calculation overhead but b) want to avoid (if possible) long-thin triangles that can result from the mapping of parametric UV positions to 3D space?  Do you have the (partial) derivatives of the mapping function?
Simon F
CC BY-SA 4.0
2018-12-12T16:20:00.680Z
@SimonF I do not have the partial derivatives but they could be numerically approximated
Makogan
<mathematics><geometry><computational-geometry><mesh>
How can you avoid thin triangles in a parametric shape in a smart way?
Makogan
# How can you avoid thin triangles in a parametric shape in a smart way?

(Asked by: username_0 on 2018-12-11)

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?

**Tags:** mathematics, geometry, computational-geometry, mesh

> **Comments:**
> **username_1**: 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?  
> **username_0**: I can't take pictures of this :p  
> **username_0**: @username_1 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.  
> **username_2**: 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?  
> **username_0**: 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.  
> **username_2**: Just to get it clear in my head you want a) a simple grid-like subdivision of the parametric space so that there is minimal calculation overhead but b) want to avoid (if possible) long-thin triangles that can result from the mapping of parametric UV positions to 3D space?  Do you have the (partial) derivatives of the mapping function?  
> **username_0**: @username_2 I do not have the partial derivatives but they could be numerically approximated  

---

## 0 answers

