gluLookAt and the modelview matrix.

Hi,
I am struggling with gluLookAt(…). Could someone please give me an indepth explanation of it? For example, say I am given the
eye point, the at point and the up direction,
how do I formulate the modelview matrix?

Thanks for your time.

Well gluLookAt( POSITION, DIRECTION WHERE YOU LOOK, UP VECTOR)

the POSITION is a vector of 3 components and here is where you say where the camera is.
The next parameter is where you say… where to look at.

And the last one is the up vector… Is where you choose where is UP in the scene…

how do I formulate the modelview matrix?

You don’t formulate the modelview matrix with gluLookAt, it does it for you!
And if you want to re-write the gluLookAt function for your own purpose, look at the gluLookAt man page and if it is not enough you can glance at the mesa opengl implementation source code.