Hi to all,

I have a small problem because I created a point map in canvas (link to image : https://easyupload.io/jj3szc). I would now like to connect these points into triangles, thanks to which I will get a triangle mesh. Is it possible to create a 2D mesh automatically in three.js, or do you have another idea? later I would like to download data about each triangle, for example, what vertices it has

Hi!

Is it an option to use `THREE.PlaneGeometry()`

or `THREE.PlaneBufferGeometry()`

?

With them you’ll get a set of pre-defined triangles (faces) that form a plane.

1 Like

If the points form a grid, as in your image, then use a plane geometry as @prisoner849 suggests to construct an equivalent grid.

If they could be any arbitrary points in 2D or 3D space, you will need to use a triangulation algorithm like Delaunay. I like this implemenation: https://github.com/mikolalysenko/delaunay-triangulate

1 Like

donmccurdy thanks a lot ! :)))

thanks, I remember this function