# "normal" & glNormal*( )

I don’t understand what does “normal” mean.
And what is glNormal*() used for?

``````  |
/|\ normal n
|
/-|-----------/
``````

/ | /
/ | Plane P /
/ /
/-------------/

glNormal*() is used to pass to OpenGL what the normal for a particular plane is, and this is used by OpenGL for lightning issues.

For example: if the plane P drawed above would be a plane that went through the x and z-axis, then a valid normal would be (0.0f, 1.0f, 0.0f). Normals can also be larger than this one, (0.0f, 3.0f, 0.0f) is also a valid normal for plane P.

But to use glNormal*() you should use unified normals, that means that the lenght of the normal should be equal to 1.

You should check Nehes tutorial on this: http://nehe.gamedev.net/tutorials/lesson07.asp

Also the lightning chapter of the OpenGL Superbible : http://nehe.gamedev.net/tutorials/lesson07.asp
gives you a good introduction on this topic.

Hope this helps,

Daniel Palomo van Es

[This message has been edited by DPalomo (edited 10-29-2000).]

[This message has been edited by DPalomo (edited 10-29-2000).]

Thank you very much, Daniel.

in simple terms the normal tells opengl which side of your polygon is front and which is back, i.e. the normal is on the front of the polygon. also…
eqn of a plane is
ax+by+cz+d
where a, b, c are the normal of the plane(or rather its orientation in space) and d is the distance of this plane from an origin

gav