Mesh Texture Overcoding

Hi guys! Simple problem with applying texture on a mesh:
I want my texture adapting over the mesh, so I try:
https://vvvv.org/sites/default/files/imagecache/large/images/Mesh1_2012.05.29-10.30.37.png

but when the mesh is too thin, too much deformation!
https://vvvv.org/sites/default/files/imagecache/large/images/Mesh2_2012.05.29-10.41.56.png

solution: adapt the mesh on the bigger side, the other side follow
https://vvvv.org/sites/default/files/imagecache/large/images/Mesh3_2012.05.29-10.43.15.png
https://vvvv.org/sites/default/files/imagecache/large/images/intreccia_2012.05.29-10.43.40.png

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)