Creating a 3D Planet Orbit Simulator

Click For Summary

Discussion Overview

The discussion revolves around creating a three-dimensional planetary orbit simulator, focusing on the mathematical and physical principles necessary to calculate the position of a planet over time in a circular or elliptical orbit around the sun. Participants explore various approaches to modeling orbits, including parametric equations and orbital elements.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks a formula to determine a planet's position at a given time, considering circular orbits that may be tilted.
  • Another participant suggests using parametric equations for circular orbits in different planes, providing specific equations for the x-y and x-z planes, and a more general form for tilted orbits.
  • A third participant expands the definition of orbits to include conic sections, such as ellipses and hyperbolas, indicating that the sun is at one focus of these shapes.
  • Another participant introduces the concept of orbital elements, explaining the parameters needed to describe elliptical orbits, including semi-major axis and eccentricity, and discusses Kepler's laws for determining a planet's position over time.
  • One participant critiques the level of detail provided in the explanation of orbital elements, suggesting it may exceed the original question's scope.

Areas of Agreement / Disagreement

Participants present multiple competing views on how to approach the problem of simulating planetary orbits, with no consensus on a single method or model. Some focus on circular orbits while others emphasize elliptical orbits and the associated parameters.

Contextual Notes

The discussion includes various assumptions about the nature of orbits and the mathematical models used, with some participants suggesting additional complexities such as corrections to gravitational laws, which may not align with the original inquiry.

Ciemnl
Messages
3
Reaction score
0
I am making a three dimensional planetary orbit simulator but I can't figure out a formula that can work out where a certain planet is at a certain time e.g. if a planet with speed s was at position a with the sun at position b at time 0 then how would I calculate the position of the planet at time 1? bearing in mind that the orbits are perfectly circular but may be tilted.
 
Last edited:
Physics news on Phys.org
There are two possible ways to interpret your question...

1. What is the equation of a circlualr curve in R^3? (math)

2. How can I get the equation for the trajectory of an object rotating around the sun? (physics)

The first question seems to me to be more like what you're asking... and as such, I would suggest you use parametric equations, which is exactly what it seems like you need (since you are making the planet's position a function of time).

So, say you wanted an orbit that was in a flat circle around the sun... say in the x-y plane. Well, you already know the answer: x = R cos(t), y = R sin(t), z = 0.

If you wanted it in the x-z plane, it could be something like: x = R cos(t), y = 0, z = R sin(t).

Finally, if you want it to be somewhere in between, we can make an educated guess:
x = R cos(t), y = R sin(t) cos (theta), z = R sin(t) sin (theta), where theta is measured with respect to the positive y axis. We see that |<x,y,z>| = R^2 and it works in the limits theta = 0 and theta = pi/2.

2. As far as the physics is concerned, you can either model the set of differential equations a la numerical analysis, or you can just use physics to get the parameters for the above method.

Anyway, hopefully this wasn't a complete misunderstanding of your problem. Best of luck,

- csprof2000
 
More generally, an "orbit" can be any conic section- a circle, ellipse, hyperbola, or parabola with the sun at one focus. Of course, a straight line through the sun is also possible.
 
What you are after is what are called orbital elements. A google search for that term will yield a lot of hits. Planet orbits are (nearly) elliptical with the Sun at one of the foci of the ellipse. I'll split this discussion into two parts: The nature of the orbit, and the orientation of the orbit with respect to some reference system.

Two parameters are needed to describe the size and shape of the orbital ellipse. Typically, these are the "semi-major axis length" and the "eccentricity" of the orbit. The eccentricity describes how squashed the ellipse is. The major axis length is the length from one end of the ellipse to the other along the line defined by the foci of the ellipse. The semi-major axis length is simply half of the major axis length.

The planet moves along the orbit according to Kepler's third law (google that). At any point in time, the location of the planet on the orbit can be described by one angular parameter. The most obvious is the "true anomaly" angle between the line segment extending from the Sun to the point at which the planet is closest to the Sun (the perihelion point) and the line segment extending from the Sun to the planet's location at some specific point in time. Others are the eccentric anomaly and the mean anomaly; you will need to understand these (google Kepler's equation) to propagate the orbit in time.Now for the orientation. Two parameters are needed to describe the plane in which a planet orbits: inclination and "right ascension of ascending node". The inclination is the dihedral angle between the orbital plane and some reference plane. The "right ascension of ascending node", the angle on the reference plane between some reference line and the line defined by the intersection of the two planes (the "line of nodes"). There is an ambiguity of 180 degrees in this description. Denote the reference plane as the x-y plane. There is a third dimension, the z dimension normal to this plane. Arbitrarily pick one direction on the z axis as positive and the other as negative. The "right ascension" part of the name "right ascension of ascending node" means to measure the angle as a right-hand rotation about the positive z axis. The "ascending node" part of the name means that one measures the angle from the reference line to the ascending node, the point where the planet crosses the reference plane with an increasing z direction.

This still doesn't pin the orbit down completely. Rotate an ellipse with a given size and shape and you get another ellipse with the same size and shape. Fix the angle and you get a single ellipse. That angle is the "argument of periapsis", the angle between the ascending node and the point of closest approach (periapsis), measured positive in the direction of planet motion.

Altogether, seven parameters:

a the semi-major axis length

e the eccentricity of the orbit

i the orbital plane inclination

\Omega the right ascension of ascending node

\omega the argument of periapsis

\nu the true anomaly at some epoch time

t the epoch time.
 
Wow, I think that's a little more than he was asking for, D H. Why not add the 1/r^4 correction to Newton's law of universal gravitation while you're at it?
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
1K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K