Anyone know? Seems weird, expecially considering that bodies themselves orbit the points instead of following the vectors...
Just curious...
Why are orbits drawn as vectors instead of points?
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Why are orbits drawn as vectors instead of points?
Steven Binder, Mac OS X 10.4.10
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
LOL... actually my question is coming from a person who apparently doesn't know what a vector is...
What I guess I MEANT to ask is why are orbits drawn as lines between a bunch of points? I'm sure it has something to do with the fact that to calculate ALL the points in an orbit (which is huge) would take too much computing power. Yet, as the planets orbit the sun, they are NOT moving in straight lines drawn between a bunch of points, they are moving in a perfectly calculated orbit. How come this isn't possible for orbit lines?
S
What I guess I MEANT to ask is why are orbits drawn as lines between a bunch of points? I'm sure it has something to do with the fact that to calculate ALL the points in an orbit (which is huge) would take too much computing power. Yet, as the planets orbit the sun, they are NOT moving in straight lines drawn between a bunch of points, they are moving in a perfectly calculated orbit. How come this isn't possible for orbit lines?
S
Steven Binder, Mac OS X 10.4.10
BlindedByTheLight wrote:I'm sure it has something to do with the fact that to calculate ALL the points in an orbit (which is huge) would take too much computing power.
Actually, the number of points in an orbit is more than huge. It's infinite. Calculating ALL the points would take forever, however powerful the computer.
Celestia doesn't need to calculate ALL the points. Only enough for the orbit to appear smooth. But this depends on how closely the observer views the orbit, and at present Celestia generates the orbit points without regard to the view. Otherwise the orbit points would have to be recalculated continuously, which would likely degrade performance significantly.
- Hank
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
hank wrote:Actually, the number of points in an orbit is more than huge. It's infinite. Calculating ALL the points would take forever, however powerful the computer.BlindedByTheLight wrote:I'm sure it has something to do with the fact that to calculate ALL the points in an orbit (which is huge) would take too much computing power.
Celestia doesn't need to calculate ALL the points. Only enough for the orbit to appear smooth. But this depends on how closely the observer views the orbit, and at present Celestia generates the orbit points without regard to the view. Otherwise the orbit points would have to be recalculated continuously, which would likely degrade performance significantly.
- Hank
Thanks Hank. Just curious though... the planets that revolved around the sun... they seem to be following a far more accurate orbital curve than the displayed orbit lines. Why can the planets orbital arc be handled better computatationally but the drawing of the entire orbit not?
Thanks,
S
Steven Binder, Mac OS X 10.4.10
BlindedByTheLight wrote:Thanks Hank. Just curious though... the planets that revolved around the sun... they seem to be following a far more accurate orbital curve than the displayed orbit lines. Why can the planets orbital arc be handled better computatationally but the drawing of the entire orbit not?
To display the planet as it moves around the sun, Celestia only has to calculate one point on the orbit for each frame: the position of the planet at the current time. To draw the orbit itself, many points on the orbit must be calculated.
- Hank
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Gotcha... makes sense. I guess I just imagined that, since the graphics card was capable of actually drawing the specific pixels of a LINE between two points, it would also be able to draw a common curve like an ellipse between two points. Wouldn't you think? Anyhoo, thanks for the info.
Had a thought though... you had written prior that:
As of now, it seems that Celestia calculates a default of 100 (or 150 - I can't remember) points to draw an orbit. And you were saying that it would be too "expensive" in processor power for Celestia to dynamically up that number as one got closer to a planet. But what about splitting the difference?
For example, using 150 points to calculate the orbit lines: one hundred points are spread out over the entire orbit to draw the interconnecting lines (creating Line 1, Line 2, Line 3, etc). and the other 50 are focused on whatever particular Line the orbiting body is in at that moment. So if Earth is at Line 50 (between points 49 and 50) that particular line will have 50 extra points.
Thus, as one got closer to Earth, the orbit lines would better match up to the orbiting body.
Sure, as the orbiting body got near to one of the connecting points, it may look a little funky - but any funkier than orbit lines look now when you get close? At least some of the time the orbit lines would like right?
And would dividing up the 150 points this way cost much more (or ANY more) in processor power than just the 150 points spread over the whole orbit?
Thanks,
Steve
Had a thought though... you had written prior that:
Celestia doesn't need to calculate ALL the points. Only enough for the orbit to appear smooth. But this depends on how closely the observer views the orbit, and at present Celestia generates the orbit points without regard to the view. Otherwise the orbit points would have to be recalculated continuously, which would likely degrade performance significantly.
As of now, it seems that Celestia calculates a default of 100 (or 150 - I can't remember) points to draw an orbit. And you were saying that it would be too "expensive" in processor power for Celestia to dynamically up that number as one got closer to a planet. But what about splitting the difference?
For example, using 150 points to calculate the orbit lines: one hundred points are spread out over the entire orbit to draw the interconnecting lines (creating Line 1, Line 2, Line 3, etc). and the other 50 are focused on whatever particular Line the orbiting body is in at that moment. So if Earth is at Line 50 (between points 49 and 50) that particular line will have 50 extra points.
Thus, as one got closer to Earth, the orbit lines would better match up to the orbiting body.
Sure, as the orbiting body got near to one of the connecting points, it may look a little funky - but any funkier than orbit lines look now when you get close? At least some of the time the orbit lines would like right?
And would dividing up the 150 points this way cost much more (or ANY more) in processor power than just the 150 points spread over the whole orbit?
Thanks,
Steve
Last edited by BlindedByTheLight on 17.07.2005, 00:00, edited 1 time in total.
Steven Binder, Mac OS X 10.4.10
My two cents
A long time ago I've proposed to use nurbs spline (that are already available in GLU to draw the orbits resampling the points at every frame.
http://www.mevis.de/opengl/gluNurbsCurve.html
Ideally sampling 4 points (knots) per orbit (on the quarters) should be enough in order to draw an elliptical shape. Other 8 points has to be calculated on the tangents of the knots to create the handles (control points) required by the function. The number of intermediate points are calculated by the function and it should be customizable in the cfg file like the xyz paths.
Since this should be computationally expensive it should be advisable to use a switch like this:
Use nurbs orbits for:
- all
- planets, moons and comets
- planets and moons
- planets
- selected body only
- never use always the standard method.
So the user can modulate the total amount of overhead accordingly with the performance of the PC.
Accordingly with the latest issue raised by Steve, this method can implement easily the LOD of the rendered orbit accordingly with the distance of the observer from the body. If necessary it will be sufficient to manage the number of intermediate points.
Kind regards
A long time ago I've proposed to use nurbs spline (that are already available in GLU to draw the orbits resampling the points at every frame.
http://www.mevis.de/opengl/gluNurbsCurve.html
Ideally sampling 4 points (knots) per orbit (on the quarters) should be enough in order to draw an elliptical shape. Other 8 points has to be calculated on the tangents of the knots to create the handles (control points) required by the function. The number of intermediate points are calculated by the function and it should be customizable in the cfg file like the xyz paths.
Since this should be computationally expensive it should be advisable to use a switch like this:
Use nurbs orbits for:
- all
- planets, moons and comets
- planets and moons
- planets
- selected body only
- never use always the standard method.
So the user can modulate the total amount of overhead accordingly with the performance of the PC.
Accordingly with the latest issue raised by Steve, this method can implement easily the LOD of the rendered orbit accordingly with the distance of the observer from the body. If necessary it will be sufficient to manage the number of intermediate points.
Kind regards
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months