Correct selection of projection matrix + scaling to get an object to fill the screen


I’ve managed to totally confuse myself with perpective projection, if I set up the projection matrix with say:

gluPerspective(60.0, float(width)/float(height), 0.1f, 200.1f);

and then I go to draw a unit sphere that is positioned at (0, 0, -100) what should I scale the sphere by to make it fill the screen?



I forgot if that angle in gluPerspective is the half or the whole angle, but anyway, i think it’s the whole one and in that case, try


as radius of your sphere )

this is where i got it :
–> sin(30°)/(100/cos(30°))