Mesh Texture Overcoding

Hi guys! Simple problem with applying texture on a mesh:
I want my texture adapting over the mesh, so I try:

but when the mesh is too thin, too much deformation!

solution: adapt the mesh on the bigger side, the other side follow

the result is exactly what I wanted! But… seems too much code!
I’m sure there are lots of simpler solution to this problem

what do you think?

Mesh Overcoding.rar (156.0 kB)