Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.78k stars 820 forks source link

Bug in rendering orbits #1650

Open alex-w opened 3 years ago

alex-w commented 3 years ago

By chance I found this question and I cannot figure out why.

stellarium-000 stellarium-001 stellarium-002

I was standing on Ganymede, with both "atmosphere" and "ground" off. When I selected Jupiter and let the orbit show, it came to me like these.

I have no idea why the revolving orbit can twist in such a weird manner. Maybe I misunderstood these kind of "orbits," but what on earth are they symbolizing?

Originally posted by @coctree52 in https://github.com/Stellarium/stellarium/discussions/1649

github-actions[bot] commented 3 years ago

Hello @alex-w! OK, developers can reproduce the issue. Thanks for the report!

gzotti commented 1 year ago

The orbits are displayed as 360-gons. The planet is forced to be a vertex of this figure, but in the closeup seen from its moons, the two legs of the 360-gon which include Jupiter show very distinctly as straight edges. The 358 other edges form a visible curve because they are nicely in the distance. Technically it is not a bug as the implementation correctly shows the 360-gon. Somebody with too much time can still add improvements, like splitting those two legs into much smaller parts.

github-actions[bot] commented 1 year ago

Hello @alex-w!

Thank you for suggesting this enhancement.

10110111 commented 1 year ago

Technically it is not a bug as the implementation correctly shows the 360-gon.

No it shows this polyline incorrectly. The almost-straight line breaks down in any projection but perspective, and its arms move with respect to stars on panning. This artifact happens because, although the points are projected correctly, the lines are straight with respect to the screen rather than the 3D space. This problem is similar to the issue with my first attempt at fixing planet rings.

gzotti commented 1 year ago

Sure, it's a straight-lined n-gon in screen space. Do you have a recipe for correct projection apart from further splitting each leg?

10110111 commented 1 year ago

I haven't looked into the implementation yet, have things to do in real life.