Given that you know the min and max values for x/y/z in a given scene and your camera has a perspective lens with a given angle “alpha” does anyone have a neat formula to compute how far on the z axis to back up the camera so that the entire scene is in view (and as close to the viewer as possible)?
My application has many scenes, some wider and some longer and I have yet to come up with a formula that works for all cases. Has anyone solved this problem before?
thanks in advance,
...bob klein…