Rotate around a certain point!!!!

Hi everybody!
Here’s my problem:
I want to follow a circle around the origin and look always at the origin, using gluLookAt…
My code is this:

float xp=10cos(theta);
float yp=0;
float zp=10
float xd=-cos(theta);
float yd=0;
float zd=-sin(theta);
float xu=0;
float yu=1;
float zu=0;


What can I do to keep my object in the center of the screen instead of moving it around???

I don’t now why I move all the scene around instead of moving only the point of view!!

Any help will be very appreciated.

You could not move the center point of your lookat matrix around:

  cam_x, cam_y, cam_z,
  0, 0, 0,
  0, 1, 0

The second set of parameters (your xd, yd and yz) are a point in space, not a direction.