/// move the world centre to origin:
glTranslatef(-1.0f * centroid);
/// move everything beneath the origin
glTranslatef(0,0,-1.0f * camera_distance);
/// rotate the world about the z axis
glRotated(Theta,0.0,0.0,1.0);
The translations work fine, but the rotation does not; I expected it to rotate the world beneath the camera along an axis through the camera.
A theta angle of just 1 degree will make the whole world disappear, and a theta angle of 0.001 degrees will move it a bit, but it doesn’t look like a rotation to me.
It’s generally not a good idea to use glTranslate, glRotate, & glScale on the projection matrix. The projection matrix defines the shape of your viewing volume and shouldn’t be used to position/orient a “camera.” Camera-like positioning/orientation should be done as the first step of setting up the modelview matrix.
By trying to do these things in the projection matrix, you are likely to get undesired results when it comes to adding things like fog and lighting.