I have a problem which I dont know how to solve it. I have a close surface in 3D space that divides the space into two parts: inside and outside of the surface. The mesh is unstructured triangular mesh, one array of integers stores the three vertices belong to each of the triangles, I have another array of real numbers which have a positions of vertices. I wish to compute the unit normal vectors uniformly towards inside or outside for each of the triangles with minimum cost. I do not know how to reorganize the data in order to get the correct uniform in/outside normal vectors through the surface. what is the pseudo code to do that? how should I reorganize the data?