Correct way to implement Mars ellipsoid

I’ve been trying to make a demo of rendering Mars in CesiumJS, and I’d like to make it ellipsoid-accurate.

Here’s my current work:

(I based my work on Cesium Sandcastle )

Now, instead of using the 3396000m sphere as an ellipsoid as that example does, I tried to use the proper Mars ellipsoid as defined here ref Mars Geodetic parameters from MOLA

However, entering these values (see commented line #2) makes the globe not display.

Can anyone comment on what I’m doing wrong, or any other suggestions for “doing Mars right”?

I also intend to do a Moon example, as we’ve done a bit of Lunar vision navigation stuff in the past and I’d like to show how to do a Moon data visualization properly as well.

There currently seems to be an assumption that is made in CesiumJS in various places - namely, that the x- and y-radius are equal. I had a short look at the sandcastle, and think that this is the reason why nothing appears for the given ellipsoid. I wrote up Overly restrictive assumption about ellipsoid radii being equal · Issue #12110 · CesiumGS/cesium · GitHub , but identifying the exact places where this assumption is made (and changing the implementation to really work with arbitrary ellipsoids) might not be trivial. As a first workaround, you might consider setting the x- and y-component of the radii to equal values.