Create straight edges of a geometry

I am doing a geometry with random vertices and I want to make the edges straight like a PlaneGeometry, also the correct UV coordinates.

this is the pen

This is the closest thing I found to what I want to achieve
Blender_LP_Illustration_009b

There was a discussion on the discord already:

Have you tried what users recommended you to do? In particular, add a contour points to have straight edges of the plane.

Oh, I see you’re still using this:
uv.setXYZ(i, x, y);
Though I showed you this example: https://jsfiddle.net/prisoner849/msL80aow/ on the discord channel.

I don’t understand very well the issue of correcting the texture in this plane with vertices in random positions. The edges are already fixed, but the texture looks bad.
Sorry for asking so many questions

Real amount of vertices differs from numPoints:

1 Like

Thanks you are a genius, always getting me out of trouble

1 Like

You’re welcome :slight_smile: :beers: