Use Cesium for bodies other than the Earth

297 views
Skip to first unread message

juan...@gmail.com

unread,
Oct 19, 2017, 5:09:32 PM10/19/17
to cesium-dev
In poliastro, a Python library for Astrodynamics focused on interplanetary applications (http://docs.poliastro.space/), we were considering using Cesium and CZML to export 3D plots of orbits. However, I am not sure this is at all possible: the ability to specify a central body that is *not* the Earth is mentioned in this outdated roadmap from 2015:

https://github.com/AnalyticalGraphicsInc/cesium/wiki/Architecture

The CentralBody primitive represents the globe (in a future Cesium version, any central body such as the Moon and Mars will be supported).

However, there are no further references since then.

On the other hand, by reading the simple.czml example I see that nowhere it is specified which central body do the satellites orbit:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Specs/Data/CZML/simple.czml

This means that I could focus on exporting an orbit as a correct CZML and leave the rest to the user. But I fear that this will lead to incorrect results because there are many Earth-based assumptions in Cesium.

What do others think about this? Is it at all within Cesium vision?

Kind regards,

Scott Hunter

unread,
Oct 19, 2017, 5:48:26 PM10/19/17
to cesiu...@googlegroups.com
Currently, Cesium generally supports a single central body in a scene (the scene's "globe").  Other bodies can be rendered using an EllipsoidPrimitive (as done with the Moon) or as a custom billboard (as done with the Sun), but their visual appearance is greatly simplified compared with how Earth is rendered (with terrain, imagery, etc.).

Scenes on other planets can be created by changing the ellipsoid of the (single) globe to instead reflect the other planet's shape, and then loading different imagery onto that geometry.  I believe users have done this to create Mars-based applications.  The ellipsoid is passed around in many places which all default to WGS84, but they should all allow passing a custom ellipsoid instead.

You're right that CZML doesn't specify the body that data is defined in, but generally it is all loaded relative to the scene's body, which defines the reference frame for cartesian coordinates specified in the CZML file.



--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Juan Luis Cano

unread,
Oct 19, 2017, 6:53:26 PM10/19/17
to cesiu...@googlegroups.com
Thanks Scott. Let me answer in-line:

On Thu, Oct 19, 2017 at 11:48 PM, Scott Hunter <para...@gmail.com> wrote:
Currently, Cesium generally supports a single central body in a scene (the scene's "globe").

And how could I tell it to be Venus, Neptune or whatever other body?
 
Other bodies can be rendered using an EllipsoidPrimitive (as done with the Moon) or as a custom billboard (as done with the Sun),

What do you mean by "as done with the Moon" or "with the Sun"? Do you have specific examples at hand?
 
but their visual appearance is greatly simplified compared with how Earth is rendered (with terrain, imagery, etc.).

This is fine for me, as I actually am less concerned about visual appearance of the terrain.
 
Scenes on other planets can be created by changing the ellipsoid of the (single) globe to instead reflect the other planet's shape, and then loading different imagery onto that geometry.  I believe users have done this to create Mars-based applications.  The ellipsoid is passed around in many places which all default to WGS84, but they should all allow passing a custom ellipsoid instead.

Understood.
 
You're right that CZML doesn't specify the body that data is defined in, but generally it is all loaded relative to the scene's body, which defines the reference frame for cartesian coordinates specified in the CZML file.

So if I understood correctly, given a CZML there's no way to know which body it originated from. Is that correct? Perhaps there is some metadata that I can use for that? Even some simple parameters like the gravitational parameter or the radius would suffice.
 



On Thu, Oct 19, 2017 at 5:09 PM, <juan...@gmail.com> wrote:
In poliastro, a Python library for Astrodynamics focused on interplanetary applications (http://docs.poliastro.space/), we were considering using Cesium and CZML to export 3D plots of orbits. However, I am not sure this is at all possible: the ability to specify a central body that is *not* the Earth is mentioned in this outdated roadmap from 2015:

https://github.com/AnalyticalGraphicsInc/cesium/wiki/Architecture

The CentralBody primitive represents the globe (in a future Cesium version, any central body such as the Moon and Mars will be supported).

However, there are no further references since then.

On the other hand, by reading the simple.czml example I see that nowhere it is specified which central body do the satellites orbit:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Specs/Data/CZML/simple.czml

This means that I could focus on exporting an orbit as a correct CZML and leave the rest to the user. But I fear that this will lead to incorrect results because there are many Earth-based assumptions in Cesium.

What do others think about this? Is it at all within Cesium vision?

Kind regards,

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/_zKyk0fRd-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Juan Luis Cano

Sarah Chow

unread,
Oct 20, 2017, 9:14:48 AM10/20/17
to cesium-dev
There's been discussion on the forum in the past about how to set the globe up as another planet

You can see what other people have done with Mars and the asteroid Vesta in Cesium. 

But those are still for exploring a single body that's not the Earth, not for creating an entire solar system with multiple planets and orbits. 

Scott Hunter

unread,
Oct 20, 2017, 3:11:49 PM10/20/17
to cesiu...@googlegroups.com
On Thu, Oct 19, 2017 at 6:53 PM, Juan Luis Cano <juan...@gmail.com> wrote:
Thanks Scott. Let me answer in-line:

On Thu, Oct 19, 2017 at 11:48 PM, Scott Hunter <para...@gmail.com> wrote:
Currently, Cesium generally supports a single central body in a scene (the scene's "globe").

And how could I tell it to be Venus, Neptune or whatever other body?

By changing the ellipsoid parameters (i.e. using a custom Ellipsoid object), as I mentioned in my previous email, to change the shape of the globe.

You could even turn off the globe visually, and then consider the reference frame of the scene as the solar system barycenter and position ellipsoids in that coordinate system.  

  
Other bodies can be rendered using an EllipsoidPrimitive (as done with the Moon) or as a custom billboard (as done with the Sun),

What do you mean by "as done with the Moon" or "with the Sun"? Do you have specific examples at hand?

The Moon and Sun are rendered by default in the Cesium scene, in their correct locations.  (there's a Vectors sandcastle example that can help find their location in the sky to see what they look like)

You can look in their source files to see how they are implemented.  


The Moon is simpler, a basic textured ellipsoid.  The Sun uses a custom shader to get the visual flare effect.
 

You're right that CZML doesn't specify the body that data is defined in, but generally it is all loaded relative to the scene's body, which defines the reference frame for cartesian coordinates specified in the CZML file.

So if I understood correctly, given a CZML there's no way to know which body it originated from. Is that correct? Perhaps there is some metadata that I can use for that? Even some simple parameters like the gravitational parameter or the radius would suffice.

CZML supports custom properties, which you could use to include whatever additional data you want, and then in your JavaScript code, examine the value of those properties and reconfigure the display accordingly.



Juan Luis Cano

unread,
Oct 23, 2017, 10:51:14 AM10/23/17
to cesiu...@googlegroups.com
Thank you very much for your responses, I think I have all the information I need. It will take some time though, but we'll keep you posted with our results.

Best,

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/_zKyk0fRd-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Juan Luis Cano
Reply all
Reply to author
Forward
0 new messages