# Trouble with gluLookAt

I am trying to do a simple Right view, Left view, Top view type of thing.

From my understanding, gluLookAt takes
(x,y,z, vx, vy, vz, ux, uy, uz)

where
(x,y,z) is the position of the “camera”
(vx,vy,vz) is a point on the view vector (in my case I want it to look at the origin)
(ux,uy,uz) is the “up” vector of the camera (which only determines the “roll” angle)

``````
else if(key == 'r')
{
gluLookAt(10, 0, 0,
0, 0, 0,
0, 1, 0);
}
else if(key == 'l')
{
gluLookAt(-10, 0, 0,
0, 0, 0,
0, 1, 0);
}
else if(key =='t')
{
gluLookAt(0, 10, 0,
0, 0, 0,
0, 0, 1);
}

``````

I drew a cube and then tried this out. The problem is that no matter what I set the (x,y,z) to, it is always VERY close to the cube. I thought if i set it to (10, 0, 0) the cube would look much bigger than if I set it to (100, 0, 0). They look exactly the same size.

What have I missed?

Thanks!

Dave

Probably you are using orthogonal projection (gluOrthoxx).

Change to perspective projection using gluPerspective instead of gluOrtho

If you put the cube close to near or far plane it will look the same because you’re using parallel projection. If you want to make it bigger scale it.