Thanks for the response.
I can get it in the center of the viewport but it does not scale well to fit the viewport. Here is the code I have.
Where am I going wrong? Appreciate your help.
...
glViewport(lowerLeft.x, lowerLeft.y, size.x, size.y);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
GLfloat aspect = (float)(size.x)/(float)(size.y);
GLfloat diam = 2 * boundingSphere.radius;
GLfloat zNear = 0.01f;
GLfloat zFar = zNear+diam;
GLfloat rMax = 0.0f;
glTranslatef(0, 0, -7);
ymax = zNear * tanf(fieldOfView * M_PI / 360.0);
ymin = -ymax;
xmin = ymin * aspect;
xmax = ymax * aspect;
rMax = (7 + diam) * sin((double)((fieldOfView * M_PI)/180)/2);
zoom = (float)(diam/2.0f)/rMax;
glMatrixMode(GL_PROJECTION);
glFrustumf(xmin * zoom, xmax * zoom, ymin * zoom, ymax * zoom, zNear, zFar);
....