Hi,
I am trying to generate a mesh from an algorithm and have a question regarding the numbering of vertices and triangles. I am quite new to programming involving 3D objects and have tried searching but maybe i dont know the terminology.
I use an algorithm to generate the vertices first then apply the triangles to those vertices.

Is there a best practice or rule when it comes to numbering the vertices. Given a box mesh with 8 vertices, in what order should they be numbered?

Given a face of the box as shown in the picture below. I know the triangle should be defined in a clockwise manner when facing it. But does it matter if the triangle is numbered as (0, 2, 3), (3, 0, 2) or (2, 3, 0)?

Are there mathematical algorithms that can be applied to generate triangles for a solid mesh given its vertices? (I guess there must be a lot of different ways to do this?)
I would love if someone could point me in the direction of some relevant theory on the subject. Thanks!