-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
Smooth orbit lines (esp. for comets) #3371
Conversation
- Refactor KeplerOrbit - use Mean Anomaly or Eccentric Anomaly as input - Draw closed orbits where possible, even for parts beyond orbit_good The orbits for elongated ellipses (e<0.999) are now closed and look much better by using steps in eccentric anomaly instead of time steps.
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
Is the screenshot the state before this PR or after? |
It's the new state. Previously, only the orbit_good days were shown for the orbits, although most can now be shown entirely. Yes, there are still a few edges visible, those are close to the observer. We can increase to 720 or 1440 steps per orbit to remedy that somewhat (at probably high CPU cost), but an n-gon always has vertices... |
How is the second commit related to this PR? |
It just happened, but has to do with comets and was long overdue. If all goes well, there will be two separate commits resulting from this PR. |
This way would indeed require too many vertices, the closer the curve and the wider the FoV, the more vertices we'd need. But we need them only in one section, not for the whole orbit. So I think a better approach would be to generate the orbit already in the screen coordinates (which we do need to obtain anyway in
|
I did not intend to fix #1650. This here provides a significant improvement, though. |
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.
Well, good improvement
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
Hello @gzotti! Please check the latest stable version of Stellarium: |
Description
Drawing orbit lines from 360 time steps along the orbit works well for ellipses with low eccentricity only.
For highly elongated comet orbits, the perihel area is covered only with a few vertices, which causes a polygonal, usually vastly undersampled appearance. With the time step approach, the situation was remedied a bit by not plotting the entire orbit, but only the part which is signified by the orbit_good value in ssystem_minor.ini.
This PR provides a solution that constructs the entire orbit for ellipses with eccentricities e<0.999, by stepping over the eccentric anomaly. This looks generally much better and allows the estimation where in the outer solar system the object has its aphel. There still remain a few "polygon orbits" when they appear close to the observer.
Fixes # (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: