CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
13.03k stars 3.51k forks source link

如何建立以太阳为中心的天体轨道 #7824

Closed hanyingling closed 5 years ago

hanyingling commented 5 years ago

我想建立一个以太阳为中心的天体运动轨道,地球,火星,木星等行星围绕太阳运行形成一个圆形轨道,请问cesium目前是否有支持该想法的技术

OmarShehata commented 5 years ago

From Google Translate:

I want to build a sun-centered celestial orbit. Earth, Mars, Jupiter and other planets orbit around the sun to form a circular orbit. Does cesium have any technology to support this idea?

I would say there's nothing built-in to CesiumJS to support displaying multiple globes together at the same time. I think you could conceivably create other ellipsoids and fly to them, but I imagine precision issues will arise at interplanetary scales.

hanyingling commented 5 years ago

@OmarShehata ,我用椭圆体( ellipsoid )创建的轨道,但是所有的天体(包括太阳,火星,木星等)都是围绕地球旋转,如何使它们围绕太阳旋转,cesium有没有这种方法?

OmarShehata commented 5 years ago

From Google Translate of the above:

I use the ellipsoid (ellipsoid) to create the orbit, but all the celestial bodies (including the sun, Mars, Jupiter, etc.) are rotating around the earth, how to make them rotate around the sun, is there any way for cesium?

I think you'll have to create these systems yourself. This class for computing the sun and moon's positions might help point you in the right direction:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/Simon1994PlanetaryPositions.js

Best of luck! If you do get something working feel free to share it with us on Twitter (https://twitter.com/cesiumjs) or on the forum!

wangtengwei0707 commented 1 year ago

@hanyingling 你先了解你的轨道数据来源 各种坐标系 常用的地固系和 地心ICRF , 如果”你想建立一个以太阳为中心的天体运动轨道,地球,火星,木星等行星围绕太阳运行形成一个圆形轨道“ , 我建议你使用别的库,例如SpaceKit.js,问题将会变得简单很多