thanks a lot but am still not 100% ‘in the game’.
As I understand than every polygon should have its own normal point. Am I right?
I have found following example. Can I use it?
//*******************************************************************
// Function: CalculateVectorNormal
//
// Purpose: Given three points of a 3D plane, this function calculates
// the normal vector of that plane.
//
// Parameters:
// fVert1[] == array for 1st point (3 elements are x, y, and z).
// fVert2[] == array for 2nd point (3 elements are x, y, and z).
// fVert3[] == array for 3rd point (3 elements are x, y, and z).
//
// Returns:
// fNormalX == X vector for the normal vector
// fNormalY == Y vector for the normal vector
// fNormalZ == Z vector for the normal vector
//
// Comments:
//
// History: Date Author Reason
// 3/22/95 GGB Created
//**********************************************************************
GLvoid CalculateVectorNormal(GLfloat fVert1[], GLfloat fVert2[],
GLfloat fVert3[], GLfloat *fNormalX,
GLfloat *fNormalY, GLfloat *fNormalZ)
{
GLfloat Qx, Qy, Qz, Px, Py, Pz;
Qx = fVert2[0]-fVert1[0];
Qy = fVert2[1]-fVert1[1];
Qz = fVert2[2]-fVert1[2];
Px = fVert3[0]-fVert1[0];
Py = fVert3[1]-fVert1[1];
Pz = fVert3[2]-fVert1[2];
fNormalX = PyQz - PzQy;
fNormalY = PzQx - PxQz;
fNormalZ = PxQy - Py*Qx;
}
//and here is the function call:
glBegin(GL_POLYGON);
glVertex3fv(fVert1);
glVertex3fv(fVert2);
glVertex3fv(fVert3);
glVertex3fv(fVert4);
// Calculate the vector normal coming out of the 3D polygon.
CalculateVectorNormal(fVert1, fVert2, fVert3, &fNormalX,
&fNormalY, &fNormalZ);
// Set the normal vector for the polygon
glNormal3f(fNormalX, fNormalY, fNormalZ);
glEnd();
I found the example here