Hi Everyone,
I am new to openGL, I would like to know the calculation involved in finding the normal for triangle with four faces in 3D…
A triangle with 4 faces ?
If you have a triangle ABC, then the normal of it is the cross product of the vectors AB and AC.
thank you Silence for your reply.
But i am looking for normal calculation involved in Egypt Pyramid (which has 4 faces and a polygon base)…
This is exactly what I said. Do that for each vertex of each of your triangles. For pyramids, normals at each vertex are the normals of the face they belong to.
[QUOTE=Silence;1284694]A triangle with 4 faces ?
If you have a triangle ABC, then the normal of it is the cross product of the vectors AB and AC.[/QUOTE]
And dont forget to normalize the result!
Right ! Otherwise it won’t be a normal.