I have a 3D mesh I'm calculating vertex normals for, from the mesh's face normals. Each vertex normal is computed as an average of all the normals of the faces that share that vertex.
All that works fine, except in cases where -- due to uneven subdivision of faces over the surface of the mesh -- vertex normals can be skewed. Here is an example of an object with a skewed vertex normal, in one of its corners:
In this image you can see the various face normals (blue), the ideal vertex normals (yellow), and the problematic vertex normal (red) which is being skewed by the many face normals on the heavily subdivided side of the mesh which all share the vertex.
So my question is: is it possible to calculate a vector median, instead of an average? Here's an extra image to further illustrate: