Approximating Ellipse Orbits with Newton's Law

Click For Summary

Discussion Overview

The discussion revolves around approximating the elliptical orbits of objects using Newton's law of universal gravitation, particularly in the context of a 2D space game. Participants explore methods for simulating orbits based on position and velocity vectors, as well as the implications of orbital changes due to player actions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about approximating elliptical orbits using Newton's law, specifically for a game context without other forces.
  • Another participant requests clarification on whether the simulation involves calculating orbits based on position and velocity or plotting random orbits, suggesting that eccentricity and period might simplify the process.
  • A participant clarifies their goal of simulating the orbit of bodies based on position and velocity vectors, emphasizing the importance of the player's orbit and the ability to recalculate after applying thrust.
  • One participant proposes running the simulation ahead by five steps to collect positions and solve for a conic section.
  • A later reply mentions that it is possible to solve for orbital elements with just a single point location and velocity, although the exact formulas are not recalled.
  • Another participant discusses calculating the eccentricity vector and seeks guidance on determining the semi-major axis or other necessary information to draw the ellipse.
  • One participant provides a formula for calculating orbital energy, relating it to the semi-major axis, and suggests using known variables to derive the necessary parameters.

Areas of Agreement / Disagreement

The discussion contains multiple competing views and approaches regarding the simulation of orbits, and no consensus has been reached on the best method to calculate the necessary parameters for drawing the ellipse.

Contextual Notes

Participants express uncertainty regarding specific formulas and methods, and the discussion includes various assumptions about the simulation's parameters and the effects of player actions on orbital dynamics.

Chetic
Messages
8
Reaction score
0
How do you approximate the ellipse of an object's orbit using Newton's law of universal gravitation?
I'm working on a 2D space game and that's pretty much the only physics I use, so no other forces to consider.
 
Astronomy news on Phys.org
We need more information to be able to help you.

Do you want to simulate the orbit of a body based on its position and velocity? Do you just want to plot random orbits? In which case it would be easier to base it on eccentricity and period.

Can the orbits change and what sort of events cause the orbits to change? Application of an impulse, new velocity, new eccentricity, etc.
 
Sorry, I didn't realize.
I'm simulating the orbit of bodies based on position and velocity vectors.
The only orbit that's really interesting is the player's. The player will want to have an idea of where he is going. All I really need is how to calculate the ellipse of a two-body system.

The player can of course use thrusters to alter his orbit but surely that can simply be recalculated after the end of the impulse?

I have access to all variables involved, and I can even simulate ahead any number of steps (though as few as possible would be preferred)
 
I'm going to try running the simulation 5 steps ahead, collecting positions, and solve for a conic section.
 
You can definitely solve for the orbital elements exactly with only a single point location and velocity. I don't have my orbital mechanics textbook with me right now, so I can't look up the formulas (and I haven't used them in a while, so I don't remember for sure), but it's definitely doable.
 
Okay, forget what I said.

I've managed to calculate the eccentricity vector, which now always points towards apoapsis (with the length of the eccentricity of the orbit).
How do I calculate the semi major axis? Or something else that gives me the rest of the information I need to draw the ellipse.
 
Chetic said:
Okay, forget what I said.

I've managed to calculate the eccentricity vector, which now always points towards apoapsis (with the length of the eccentricity of the orbit).
How do I calculate the semi major axis? Or something else that gives me the rest of the information I need to draw the ellipse.

That's pretty easy. You use orbital energy.

Given that you know the orbiting object's speed and distance from the primary, and the mass of the Primary, you can find its orbital energy by:

E = \frac{mv^2}{2}-\frac{GMm}{d}

Where m is the mass of the object, v its speed, d its distance from the primary, M the mass of the primary and G the gravitational constant.

It also turns out the the orbital energy is equal to


E= -\frac{GMm}{2a}

Where 'a' is the length of the semi-major axis.

So if you can solve the first equation, you can plug this into the second one and solve for 'a'
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
3
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
3K
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K