Link: http://walter.bislins.ch/Helio
The model is a scaled down numerical simulation of 3 bodies (sun, earth, moon), obeying only Newton's law of universal gravitation and Newton's laws of motion. The simulation shows, that stable orbits can exist in the Heliocentric Model. You can change parameters of the simulated solar system and disable some forces to study the consequences.
Restart Stop MoonSun off EarthSun off Sun off Reset
The big gray circle around the earth is the Hill Sphere. It defines the range where stable orbits around the earth are possible. As long as the moon orbits within the light gray circle with the thick border, the orbit is stable. Outside this circle the orbit is instable and the moon may be lost in space or captured by the sun.
The other cicles show the initial orbits of earth and moon. You can disable all circles by disabling Show Orbits Checkbox.
The App on this page is a Simulation, not an Animation. An animation is a predetermined programmed sequence of movements, following explicit steps or certain formulas that describe the motions.
A simulation is not predetermined. It follows physical laws. The motions are generally not predictable in detail and depend on start conditions and interactions with the user.
This simulation uses Newton's laws of universal gravitation and the laws of motion. The shown trajectories and orbits are the result of this natural laws, implemented in a computer program. The simulations shows what would happen in reality given the same parameters.
So if this simulation can produce stable orbits obeying Newton's laws, then such orbits are possible in reality too.
From an observer stationary with respect to the sun we can see that the moon traces a weird epicyclic path: Sometimes he is taking over the earth on the far side of the sun, gets nearer to the sun, seems to come to a halt and the suddenly gets accelerated to catch up with the earth again:
Show Simulation of Moon's Epicycles
Even weirder is the corkscrew path of earth and moon as seen from an observer stationary with respect to the galaxy:
Show Simulation of Corkscrew Path
How is it possible that the apparent path of the bodies depend on the observer? How is it possible, that the orbits are stable despite the observation that they trace weird paths depending on the observer?
To answer this question, ask yourself the following: How does an observer influence the motion (positions and velocities) of objects which he does not affect by exerting a force on them, only by looking at them?
The answer is: The motions of observed objects are not affected by a pure observer at all. The traces of moving objects are illusions caused by the relative motion of the observer with respect to the observed objects. The traces are only pictures emerging from plotting past relative positions of objects in the coordinate system of the observer. So each observer sees their own traces, but no observer has any influence on positions, velocities or any other physical properties of the objects, as described in Relativity of Positions and Velocities.
To get a deeper inside into orbital mechanics, we need to understand some basic properties of the universe and their implications on motion in general and on orbits in particular. Here I start with a rough description of how orbits work. Read Basic Properties of the Universe to get a deeper understanding.
Gravity, Inertia, Conservation of Energy and tangential velocity are the ingredients that keep planets and moons in their orbits.
The attractive force between two bodies creates an acceleration that is directed from one body to the other. If both bodies were initially at rest with respect to each other, this would result in the bodies getting closer until they collide. But if the bodies have relative velocities that are not in the direction of the acceleration, they constantly miss each other. Because there is no friction in space slowing things down the bodies keep orbiting each other around a common center of mass, called the Barycenter.
If one body is much more massive than the other, the barycenter lies near the center of the heavier body, so the less massive body practically orbits the heavier body, while the heavy body seams to stay rather stationary, only wiggles slowly around the barycenter.
Orbits are generally not perfect circles but ellipses. Only if the velocitiy is always exactly at 90° to the acceleration vector and the magnitude has exactly a certain value then the orbit is a perfect circle. Although the orbits of the planets and moons in the solar system are all slightly elliptical, the deviation from a perfect circle is barely noticable.
On elliptical orbits the distance between two bodies and the speed of the orbiting body constantly changes, which means that the forces/accelerations between the bodies are constantly changing too. How can such orbits be stable?
This has to do with Symmetries and Conservation Laws, which are Basic Properties of the Universe.
In orbits (circular and elliptic), the total energy = sum of potential and kinetic energy at each point of the orbit is constant = conserved. It is not dependent on the excentricity of the orbit. This is also a consequence of the inverse square law of Gravity. The inverse square law on the other hand is a consequence of the universe being 3dimensional. All this enables stable elliptical orbits.
In the simulation the darker gray circle around the earth shows the range of the so called Hill Sphere. Orbits inside 1/2 (lighter gray circle) to 1/3 of this sphere are stable. Greater orbits are instable due to the influence of the sun or other big planets. Bodies outside of the Hill sphere can not orbit the earth.
If the Hill sphere lies inside a body, then there are no orbits possible around the body. For example the Hill sphere of the ISS lies inside the hull of the ISS, so an astronaut outside can not orbit the station although he gets attracted to it.
One consequence of the fact, that all masses in the solar system attract each other, is, that the earth and the other planets do not orbit around the center of the sun, but all planets and the sun orbit around the common center of mass, called the Barycenter.
The barycenter of two bodies lies on the line connecting the center of the two bodies and is nearer the body with the greater mass. In our solar system the barycenter of the sun and all planets makes complicated figures and lies sometimes inside the sun, sometimes outside.
So with respect to the common center of mass of the solar system the sun makes very slow complicated movements.
In the simulation it can be observed, that the sun revolves around a center that is not the center of the sun. Select the option Show CM to show the center of masses. The barycenter of the whole system is indicated by the red crosshair.
The barycenter of earth and moon lies also not at the center of the earth (black cross). The EarthMoon systems barycenter revolves around the sun on the orange orbit. Earth and moon revolve around this barycenter on their orbit. This feature of the simulation can be observed in reality.
Show Simulation of Barycenters
Now that we understand how the paths of objects are an illusion created by the observer and the observer has no effect on the motion of the objects, we can analyze the paths without having an observer to take into account.
To determine the trajectory of the moon we have to determine all forces acting on the moon all the times.
In the solar system all bodies exert a force on each other due to Gravity. Because the force gets much weaker as further away a body is (proportional to one over distance squared), only the force of the earth and the sun are relevant to the motion of the moon. Although the sun is very far away from the moon compared to the earth, its influence can not be neglegted, because the sun has an enormous mass.
More than 99.8% of the mass of the whole solar system is concentrated in the sun. In fact the attracting force on the moon is more than twice as strong as the attracting force of the earth on the moon. See Hill Sphere for an explanation why the moon orbits the earth anyway.
Lets explore the forces between sun, earth and moon. Because the earth has a bigger mass than the moon, the attraction force between sun and earth is greater than the attraction force between the sun and moon. The attraction force between earth and moon is the same for both, according to Newton's third law of motion.
This may be surprising. It implies that you are attracting the earth with the same force as the earth is attracting you. But because acceleration is also dependent on the mass of the attracted object, the movement of the earth caused by you attracting it is not perceivable, but not zero!
To be specific: The earth has roughly 10^{23} times more mass than a human, so the earth's displacement caused by you attracting it is 10^{23} times smaller than the displacement of you caused by earth's attraction. Nowadays we can measure the change in earths rotation rate due to the displacement of large masses, like when we empty a big artificial lake.
But back to the forces between sun, earth and moon. You can visualize the forces in the simulation:
Note that the forces between earth and moon are equal but opposite. The moon is attracting the earth with the same force as the earth is attracting the moon (Newton's third law).
Note that the acceleration of the moon and earth caused by the sun are almost the same. So they both orbit the sun at about the same path, because their mean speed around the sun is the same too.
In the left image above you see the individual force components. The total force on a body is the vector sum of the force components acting on the body. By showing the individual force components, it is easier to see what's going on.
Notice, that the attraction force sun/earth is greater than the attraction force sun/moon. You may ask, how can the moon follow a nearly circular orbit around the earth, if earth and moon are not attracted with the same force to the sun? Sould not the earth get caught by the sun or the moon get lost into space?
This is not the case. It has to do with the fact that not the force is responsible for the motion of objects, but the resulting acceleration. The acceleration is not only dependent on the force, but depends on the mass of the object too: a = F / m. So if we look at the components of the acceleration in the right image above, we notice that the acceleration in direction to the sun is the same for earth and moon! So the sun accelerates earth and moon with the same amount towards it.
This may be surprising. But on the earth we can observer the same phenomenon: each mass is accelerated exactly the same amount to the center of the earth, no matter how much mass an object has. This also applies to space. If two objects are the same distance to the sun, they get attracted to the sun with the same acceleration. So the whole earth/moon system orbits the sun on the same track.
Strictly speaking, this is not quite right. The orbit of the moon is not always exactly at the same distance to the sun. So the attraction between sun and moon changes constantly. But as long as the attraction between sun and moon does not vary a lot with respect to the mean attraction, the orbit of the moon around the earth is not disturbed much by the sun. This is the case if the distance between the earth/moon system and sun is much greater than the distance between earth and moon, so that the moon lies well inside the Hill Sphere, which is the case in reality.
Lets calculate the accelerations in the real solar system:
Sun accelerating Earth  0.00593 m/s^{2} 
Sun accelerating Moon  (0.00593 ± 0.00003) m/s^{2} 
Earth accelerating Moon  0.00270 m/s^{2} 
Moon accelerating Earth  0.0000332 m/s^{2} 
We can see that the sun is accelerating earth and moon the same amount, so earth and moon orbit the sun together. But surprisingly the sun is accelerating the moon about twice as much as the earth is accelerating the moon. Why does the moon not get accelerated away from the earth?
To anwer this we have to calculate the range around the earth in which the influence of the earth on any satellite like the moon is greater than the sun. This range is a sphere around the earh which radius is the distance from the center of the earth to the Lagrangian Points L1 and L2. This sphere is called Hill sphere. As long as a satellite stays within this sphere it keeps orbiting the earth.
The radius of the Hill sphere for the earth is:
(1) 
 
where^{'} 

Detailed numerical calculations show that orbits at or just within the Hill sphere are not stable in the long term; it appears that stable satellite orbits exist only inside 1/2 to 1/3 of the Hill radius (Source Wikipedia: Hill sphere). The distance between earth and moon is with 384,000 km smaller than 1/3 of the Hill sphere radius, so it's orbit is stable.
In the simulation the Hill sphere around the earth is displayed in light grey. You can simulate a solar system where the acceleration of the moon from the sun is bigger than the acceleration of the moon from the earth maintaining a stable orbit by clicking the following button:
Show stable orbit withing the Hill sphere
In the simulation, using the blue buttons, you can deactivate the attraction between sun, earth and moon to simulate what happens. Try to disable one force only for a very short time to disturb the orbits. There are three possibles outcomes of such disturbances:
This has 3 reasons:
Because of the Relativity of Positions and Velocities, which states that there is no such thing as absolute position and velocity, it follows, that in all systems that are not accelerated, the physical laws are not dependent on the motion of the system with respect to anything. Therefore there is no way to measure or feel any motion in a nonaccelerated system. There is no physical effect that is caused by uniform motion.
Because the impression of motion is caused by forces acting on a person and there are no forces caused by uniform motion, you can not feel uniform motion. The impression of motion can be caused by vibrations or accelerations of the vehicle. The impression of motion can also be caused by looking at objects which are moving relative to the observer. Without such a reference this impression vanishes.
Is a rotating planet orbiting a sun a nonaccelerated system?
No, orbits are accelerated motions and an object on the surface of a rotating body is in an accelerated state too. Acceleration can be measured with accelerometers. Rotations can be measured eg. with LASERGyros.
So why can't we feel the accelerations due to rotation of the earth and the moon orbiting the earth and the orbit of the earth around the sun?
Because this accelerations are too small to be noticed.
To be specific, the accelerations are:
(2) 
 
where^{'} 

(3) 
 
where^{'} 

So a 100 kg weight measured at the poles would weigh 340 g less at the equator.
(4) 
 
where^{'} 

(5) 
 
where^{'} 

To understand orbital mechanics, we need to understand some basic properties of the universe and their implications on motion in general and on orbits specifically. All motions of gravitational bound objects obey the following basic observable properties of the universe:
Note: it is not nessesary that you understand what Noether's theorem is, only the physical consequences due to observable properties of the universe are important here.
Noether's theorem states that every differentiable symmetry of the action of a physical system has a corresponding conservation law. The theorem was proven by mathematician Emmy Noether in 1915 and published in 1918.
The action of a physical system is the integral over time of a Lagrangian function, from which the system's behavior can be determined by the principle of least action. The principle of least action can be used to obtain the equations of motion for a system.
Loosely speaking, symmetries in nature account for conservations laws like:
Source: Wikipedia Noether's theorem
This symmetries of the universe are one reason why stable orbits can exist.
Position and velocity are not properties that can be assigned to a single object or system of objects. Position and velocity are relations between different objects or systems. There is no absolute reference point or center of the universe that would allow to assign an absolute position and velocity to an object or system.
You always have to measure position and velocity with respect to a certain observer or reference frame. An observer, moving relativ to another observer measures different positions and velocities of the same observed object or system.
The physical laws are the same at any point in the universe. Therefore there is no special point in the universe that is distinct from any other point, that we could call origin and use as an universal reference point. All positions and velocities are relative to a certain observer and the corresponding values are unique for this observer but different for any other observer.
Because we cannot assign any position or velocity to an object or system itself, no matter what position and velocity that system has with respect to any observer, it has no effect on the system itself whatsoever. You cannot measure a position or velocity or feel a velocity of a system itself, because it has no position and velocity assigned to itself. Position and velocity only exist in the context of relations between objects and observers and do not change the physics in the observed object or system.
This implies that we can choose an arbitrary nonaccelerated point, observer or frame as our reference to describe the motion of an object or system of objects, but for all computations we have to use the same choosen observer or reference frame.
This is reflected in the simulation as you can choose between four observer coordinate systems CoordSys and it does not change the orbits of the bodies. It only changes the apparent paths of the bodies, as apparent paths are distinct for each observer.
The simulation uses for all calculations the galaxy as the nonaccelerated reference frame, no matter which observer coordinate system is choosen. But any nonaccelerated reference frame will do the same.
Contrary to position and velocity, accelerations and forces are absolute and not relative to an observer. Each object can have an acceleration of its own due to forces acting on it independent of any observer. This means each observer measures the same acceleration of a certain object (the same change in velocity) and the same forces acting on that object. This includes an observer that is on the observed object itself at any moment in time.
So accelerations and forces that change the trajectory are local properties of an object or system that can be measured within the system itself without reference to something external. That is the reason why we can feel accelerations respectively the corresponding forces, if they are not constant and/or are greater than a certain threshold.
Accelerations and forces are related according to Newton's second law of motion:
(6) 
 
where^{'} 

Why are accelerations and forces absolute local properties of an object while position and velocity are relative to an observer?
This has to do with how acceleration is defined:
Acceleration and velocity are vector quantities. At time t the velocity of an object relative to an observer is
(7)  
where^{'} 

We can see that the relative velocities
Because forces and accelerations are proportional to each other, forces, like accelerations, are not dependent on any observer.
Mass attracts Mass: This property of mass can be measured eg. with the Cavendish Experiment. The force between two masses is according to Newton's law of universal gravitation:
(8) 
 
where^{'} 

According to Newton's third law body 1 attracts body 2 with the same force F as body 2 attracts body 1. The force vectors are pointing from one body to the other. For the vector form of this equation see Computing all Forces.
Now that we know how to compute all forces acting on an object due to gravity we can compute its acceleration, velocity and path.
Newton's laws of motion describe the connection between forces, accelerations, velocities and positions:
The second law is also called Equation of motion. If we know all forces acting on an object, we can calculate the acceleration of the object which determines the change in velocity and position in time. The connection between acceleration, velocity and position is described by the following differential equations (bare with me, I explain it below):
(9) 
 
where^{'} 

This equations simply mean, that current velocity at any time t is nothing more than an infinitesimal small path
The same applies to accelerations:
But we don't know the path of an object and it's velocity. That is what we want to calculate from the known acceleration. This can be achieved by integrating the differential equations above, so we get:
(10) 
 
where^{'} 

These are the foundations of classical mechanics and can be applied to any system of objects, as long as the speeds involved are much smaller than the speed of light and gravity is weak (eg. far from a neutron star or black hole).
The simulation uses Numerical Integration to compute velocity and position from acceleration.
The App divides the simulation in many tiny time steps of length Δt = 50 μs. For each time step the following algorithm is executed:
This algorithm is repeatet over and over again and produces the shown orbits. The essential parts of the simulation code is explained in Simulation Code of Solar System Animation explained. The whole source code can be inspected in Source Code: Solar System Animation.
First the simulation computes the forces between all bodies according to Newton's law of universal gravitation. Given the positions
(11) 
 
with  
where^{'} 

Note that the attraction force is a vector pointing from one mass to the other. According to Newton's fist law of motion the force pointing from object i to object j is the same in magnitude but in opposite direction as the force pointing from object j to object i:
(12) 
The expression
(13) 
For each of the 3 bodies we get 2 forces respectively. One force to each other body. Now we have to combine all forces acting on one body by vectorial addition to get the vector sum:
(14) 

To add vectors, you simply add the corresponding components of the vectors to get a new vector. Note, the new vector
Now each object has one single combined force acting on it. From Newton's second law of motion F = m·a we can compute the acceleration of each object due to the combined forces acting on it:
(15) 
 
where^{'} 

Note that the acceleration vector
Now we have the acceleration of each body and the direction in which the acceleration acts. How do we get from this the individual velocities and poisitions while the time is passing?
To get the velocity for each object, we have to integrate the acceleration. This is mathematically expressed as follows:
(16) 
Or we can get the change in velocity
(17) 
Similar we can calculate the position for each object at each time by integrating the velocity:
(18) 
Or the change
(19) 
We can not integrate
(20)  
(21)  
This steps are continuously repeatet for each time step
Note: the simulation uses a more sophisticated rule for the integration, that halves the error compared to the above method.
Numeric simulations like this one have one big problem: small rounding errors accumulate by the integration process. In the case of this simulation it results in slowly decaying orbits, especially if the angular speed around an object gets big. To minimize the errors the simulation computes 20,000 steps for each frame, ie 20,000 steps each 16.7 ms!
If you encounter decaying orbits, it's due to accumulating numerical errors. In reality such decays do not happen, except a body is slowed down by friction.
We have to compute start conditions, the values for positions and velocities of the bodys, so that they initially produce stable orbits. We can use Kepler's laws to compute the start positions and velocities given distances between the bodies and their orbital period.
The App also computes the masses and their corresponding sizes of the objects from the distances and periods, assuming some density of the objects, so that their pixel size is appropriate.
Note: in reality the masses, their distances and their velocities and start positions are given and the orbital periods and center of masses depend on that. For the simulation it was a priority, that the graphics fits onto the sceen. Therefor the data is computed the other way around as follows:
Given the orbital period T and the distance between two bodies D we can compute the central mass needed to hold the body in orbit using Kepler's law:
(22) 
 
where^{'} 

(23) 
 
where^{'} 

The mass of the moon is computed from the relative position of the common center of mass (CM_{EarthMoon}) between earth and moon:
(24) 
 
where^{'} 

The sun and earthmoon system orbits around a common center of mass. The distance between sun and earthmoon system as given by the parameter D_{SunEarth} has to be corrected by incorporating the calculated mass of the sun and mass of the earthmoon system from above:
(25) 
The distance of the common center of mass sunearth from the earth is:
(26) 
The distance of the common center of mass sunearth from the sun is:
(27) 
The tangential velocity of the sun around the CM is:
(28) 
And the tangential velocity of the earthmoon CM around the CM of the sun is:
(29) 
Now we can setup an initial state for the sun. To simulate movement of the whole solar system through the galaxy in the left direction we add a negative velocity component
(30) 

(31) 

The earth and moon orbit around a common center of mass between them. The distance between earth and moon as given by the parameter D_{EarthMoon} has to be corrected by incorporating the calculated masses of the earth and moon:
(32) 
The distance of the common center of mass earthmoon from the moon is:
(33) 
The distance of the common center of mass earthmoon from the earth is:
(34) 
The tangential velocity of the Earth around the CM is:
(35) 
And the tangential velocity of the moon around the CM is:
(36) 
Now we can setup an initial states for earth and moon:
(37) 

(38) 

(39) 

(40) 

The presented formulas work for a real solar system. The model however uses distances in pixels and periods in seconds. To account for that, the gravitational constant was scaled to G = 1 px^{3}/(kg·s^{2}) and all masses are scaled accordingly. The size of the bodies are computed from the scaled masses by incorporating a scaled density, so that the radius of the bodies gets in a range of 8 to 80 pixels.
The radius of a sphere with mass M and density ρ is:
(41) 
So the radius is proportional the the cube root of the mass. I can define a density factor ρ', that converts a scaled simulator mass to a decent radius:
(42) 
The following density factors turned out to be usefull to get decent pixel sizes depending on the masses:
ρ' for sun :ρ' for earth: ρ' for moon :
EXCELLENT  well done Walter.
George
Really, really excellent Walter, I might contact you by email so you can have a look at my ray tracer modelling of refraction.
Fabby stuff.
Stellar work as always.
I've also done something similar in a simple spreadsheet program, and found that you can run into problems with simple Euler integration pretty quickly. However using Verlet integration (which skips the velocity intermediate step) you get much more stable results. Might be worth looking into for this stuff.
cearnicus: Might be worth looking into [Verlet integration] for this stuff.
Thank you very much for this information.
And thank you for your contribution to gravity on the comment section of Flat Earth Dome Model. Below is a copy of your comment, because it better fits to this articel.
cearnicus:
Re gravity: it may also be instructive to look at how one can derive the basic form of Newton's law of gravitation from the observations.
In 2d, circular motion is given by
Note: this stuff is simply part of motion along a circular path. This has nothing to do with gravity (yet), this is what it means to move in a circle. In terms of forces, by definition
Kepler's laws provide an accurate description of planetary motion. They are essentially summaries of the observations. Simplifying things to circles, his third law states that the radius cubed is proportional to the period squared:
So, let's rewrite that so that it fits the formula for the centripetal force.
In other words, the pattern we see in planetary motion can be explained by a force that's inversely proportional to the distance squared between the planet and the sun. And, again, since
Now, technically it's not just simply
Putting all of this together, we get:
Again, all I've done here is distill the observed paths of planets into a formula of a force. And, oh hey, looks suspiciously like Newton's Law of gravity. Note that right now I've only looked at circles and magnitudes, but if you generalize it to vectors and ellipses, you'll find that the law of gravity correctly describes all of Kepler's laws (see its wikipedia page for details). It also correctly predicts that the falling acceleration on earth should decrease with altitude, the atmospheric pressure profile, buoyancy, periodvsdistance relation between the moons of the solar system, etc, etc.
So yes, a force of this form is required to accurately describe nature. We call this force "gravity". Flat earthers can whine about it all they like, but this is what the observations tell us.