Calculating uv texture coordinates for a procedurally generated polygon

I have a form like this:

Original vertices

and point coordinates are available (vertices have x and y components)

My texture:

UV

A simple flat UV mapping gives me:

Unwanted UV mapping

I want too:

Correct UV mapping

How to calculate the vertex positions to get the desired display? Please note that this is a mathematical problem.

Also, I can tolerate stretching as long as the tops fall to the grass side.

+1


source to share





All Articles