problem with normals computation

No each vertex in the triangle will have its own angle. Adding all 3 angles from the 3 vertices together will get 180.

If you check in my code, I compute the angle (f variable) for each vertex in traingle. So it is different for each vertex.

yes but the lines :

 v1=vpos[m.faces[i].v[1]]-vpos[m.faces[i].v[0]];
v2=vpos[m.faces[i].v[2]]-vpos[m.faces[i].v[0]]; 

will always compute the angle at vertex V[0] three times ?

Sorry, should read:

v1=vpos[m.faces[i].v[(j+1)%3]]-vpos[m.faces[i].v[j]];
v2=vpos[m.faces[i].v[(j+2)%3]]-vpos[m.faces[i].v[j]]; 

PS. Updated original post so other people do not get confused with the mistake.

ok thanks !

thanks, good advice on the angle weights… i’ve never read that (much less thought about it) before. just saying someone else found this helpful and maybe bump it so someone else might find it helpful.