Surface from array of vector3

Hello, I have an array of points, how can I create a surface from these points similar to this image:


The array may contain more points not only 4, I want to extrude this surface after that but I can’t find the approach to construct this geometry. Any help is appreciated.

Maybe this will help you? :thinking:

Indexed BufferGeometry

SurfaceGometry

PlanePoints

BufferGeometryNormals

from Collection of examples from discourse.threejs.org

NOTE! .addAttribute is now .setAttribute

3 Likes

You can’t derive a shape like shown in your image from a bunch of arbitrary points in 3D space. Assuming you have an array of 2D points AND they sequentially define the contour of a shape, you can use this array of points to create an instance of THREE.Shape. This shape can then be used to create an instance of THREE.ShapeBufferGeometry or THREE.ExtrudeBufferGeometry.

2 Likes

If you’re looking for a best fit plane to a set of points this link may be helpful:

1 Like

Thank you! these examples are exactly what I’m looking for :ok_hand:. that’s a huge collection of useful examples.

I’m glad if it’s usable for three.js users. :slightly_smiling_face: