I'm working on a mesh generation script in Unity3D. There are two curves in a 3D space, each curve has more than two nodes. I want to create a mesh of a plane where these two curves are two sides of the plane.
The nodes are used as vertices, and then I'll need to get the value for the mesh.triangles. Each curve may have different number of nodes (vertices), so how shall I group them into triangle int[], so that firstly, all vertices are used in order to best describe the shape, and secondly, no triangle is in overlap with another for better performance?
PS: These two curves will always be almost parallel, and they have no intersection when we see them in xy, xz, or yz planes. So we don't need to think about any complicated/special senario, e.g. picking vertices in different orders from two curves for different triangles.
Please see the attached picture. Thanks very much.