-
-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Densely sampling orbit of parent planet if on its moon #4013
Conversation
…n where parent planet's orbit is at the closest to the present location of the moon
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
Your results look suspicious. The orbit shouldn't have such sharp edges, especially at the same points where they were (due to the excessive quantization you were trying to solve) before your correction. |
Are you referring to the second screenshot where there are sharp edges at the same locaiton where the planet is now? That screenshot is with the current stellarium 24.3 where the first screenshot is this PR. P.S. some of those "sharp edges" might have been how I pan the parent planet to certain lcoation on screen, you can try to pan around to see if it looks "less sharp". But I Don't think there are any sharp edges that look suspicious? |
No, I mean the edges where the orbit suddenly breaks on the screenshots of the your change, not on the 24.3 ones. I can't quite imagine why it could happen to look this way. And I can't make the planet follow this orbit by scrolling time, apparently because the observer also moves in this case, though I'm not sure what the reference frame for these orbits actually is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from my being unconvinced in correctness of the render, there are a few things to fix independently from this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least some fixes for code formatting is needed (potential problems)
After some experimentation it looks like the shapes of the orbit after this change are correct (in a way). I tried simply increasing But I still can't understand how such sharp turns could appear if, say, I draw an ellipse on a rectangular sheet and tilt it away, bringing one end very close to myself. Probably the orbit calculation was already broken before your patch (or I'm missing something in the geometry of projections). |
OK, so these very sharp turns happen because these projected shapes are about 178° wide. So they are extremely eccentric ellipses, which of course should have very sharp turns. |
IIRC orbit lines are computed as 360 straight segments centered on current date, and the middle segment is refined by inserting the actual planet position, from which comes the edgy appearance. (1/360 or 1/720 of Jupiter's orbit just is still very long :) When observed from one of its moons, the two incoming and outgoing segments which intersect Jupiter will extend ~1/2 of the sky (matching your 178 degrees). Maybe, for a still smoother appearance, the adjacent segments should also be refined. |
Well, this is effectively what this PR achieves. My main concern was about the cusps of e.g. the crescent in the first screenshot of the OP. But, as I wrote in my previous comment, I've realized that they are expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few more minor comments. After you fix these, this PR will be ready for merging.
Hello @henrysky! Please check the fresh version (development snapshot) of Stellarium: |
This PR add the ability to densely sample orbit of parent planet if my current location is on its moon. To densely sample at the point where parent planet's orbit is at the closest to the present location of the moon.
NO additional line segments on top of the existing 360 segments are drawn to smooth the orbit and minimal additional calculation is required so should not affect performances. Moreover, this new code only activated if you are on a moon and drawing orbital line for your parent planet, so by default on Earth should not be affected by this PR.
Fixes #83 (issue)
Screenshots (if appropriate):
Pluto's orbit from Charon
Neptune's orbit from Naiad
Jupiter's orbit from Io
Earth's orbit from the Moon at different time in a month
Type of change
How Has This Been Tested?
Visually
Test Configuration:
Checklist: