Ok, I'm "stuck" on a very basic problem: A couple of triangle's share a vertex, what normal vector should I set for it. That is; what do I call the "average direction vector"?.
Everyone seems to just normalize the vectors, and then simply find the average of the resulting cartesian components. Alternatively, the result of this could be normalized.
For only two vectors, the average direction vector should of course lie in their plane, and it should bisect the angle between them.
Normalize the two vectors to get an isosceles triangle. Their directions, and hence the average direction vector, does not change as a result of this. Now the vector vb - va is the base of the triangle. And because the triangle is isosceles:
va + (vb - va) / 2
lies on the line bisecting the angle between them.
This can be rewritten as:
va + (vb - va) / 2 = vb / 2 + 2*va / 2 - va / 2 = vb / 2 + (2*va - va) / 2 = (vb + va) / 2
Wich is just the average of the cartesian components of the vectors, so for two vectors, what everyone seems to use works.
But what is the definition of the "average direction" of more than two vectors?
My best bet thus far is the vector wich minimizes the sum of the "errors". Where an error is the angle measured from the average to the different vectors, but I'm not sure...