I am trying to figure out how to correctly calculate the truncation boundaries of my openGL scene under orthographic projection. The code I use for this is as follows:
public void setFrustum(GL gl, GLU glu){
double[] forwardAxis = properties.getForwardAxis();
double[] leftAxis = VecMath.normalVector(properties.getUpDir(), forwardAxis);
double[] upAxis = VecMath.normalVector(forwardAxis, leftAxis);
double[] v = bounds.getWidthVector();
double width = VecMath.magnitude(VecMath.project(v, leftAxis));
double height = VecMath.magnitude(VecMath.project(v, upAxis));
double modelRatio = width / height;
double canvasRatio = properties.getAspectRatio();
if (modelRatio < canvasRatio){
width = height * canvasRatio;
} else{
height = width / canvasRatio;
}
double l = width / 2. * 1.15;
double b = height / 2. * 1.15;
double n = properties.getNear();
double f = properties.getFar();
gl.glOrtho(-l, l, -b, b, n, f);
}
So, as you can see, I get my axes and width vector:
widthVector = (xWidth, yWidth, zWidth)
and then get the width and height of the gl scene by projecting this width vector along leftAxis and upAxis. Then I map aspectRatio to the canvas aspect. I show this scene and use the width and height to calculate the boundaries of the spelling truncation (adding extras using a scale factor of 1.15).
This works well for all sorts except for the isometric representation. Here are some screenshots of this at work:


, , . , ( , !). , 1,5 1,15, - .
. !