Change frustum of camera to Orthographic

Hello all,

i'm experimenting with changing the perspective of the camera and wanted to switch to an orthographic projection. When i create the scene i get the camera and try to change the default frustum. I found this example code:

var maxRadii = ellipsoid.maximumRadius;

var frustum = new Cesium.OrthographicFrustum();
frustum.right = maxRadii * Cesium.Math.PI;
frustum.left = -c.frustum.right;
frustum.top = c.frustum.right * (canvas.clientHeight / canvas.clientWidth);
frustum.bottom = -c.frustum.top;
frustum.near = 0.01 * maxRadii;
frustum.far = 50.0 * maxRadii;

in the docs (https://cesiumjs.org/Cesium/Build/Documentation/OrthographicFrustum.html)

I'm not sure what i need to do to change the frustum, how are the bounds calculated? What is "c" in the example code? Is there something else i need to consider?

I tried some random values for now and something is displayed without errors but it is just a not recognizable line of sorts, i think i need to understand how the bounds are calculated, could someone lend me a hand?

Thanks for the help in advance,
kind regards,
Daniel

Daniel,

This isn’t something that Cesium can do out of the box and will probably need a few tweak in it’s core to support. This came up once before: https://groups.google.com/forum/#!topic/cesium-dev/lOm1POOLxgs

Patrick

Hello Patrick,

thank you for the information, i did not find that thread in my search. I am having the same issues as described there. For now it seems i will have to take some other approach of visualization.

Daniel

Hi Daniel,

We just added an orthographic projection option accessible via a new widget in the upper right if you have the time to do some testing: #5021

Patrick

Hello Patrick,

thank you for keeping me in the loop! The implementation looks promising, i'm sorry i won't be able to get into testing as i'm swamped with other things, but it is awesome to see Cesium evolving!

Daniel