Hi,
part of my project involves using opengl. I will like to know how to calculate normal vectors (for glNormal3f) for a large set of scanned object. assumming the data is something like this…
My best guess (If I got you correctly) would to enable normalization of the Normals using glEnable(GL_NORMALIZE)
and then either of the ways :
Fast one : Since you are drawing triangles, use a display list, and make a small average calculus of every 3 vertices. this is not incorrect but it is fast and close.
Slow one : calculate the plane equasion of the three vertices and find it’s normal. then set it as the normal.
both should do the trick. the only thing remaining is the question of time …