# New Solar System Simulation Project In Progress

Posted on

In case you were wondering why I haven’t posted today yet, I’ve been working on a program in C # to simulate the orbits of our solar system.

Basically, an orbit works like this: The planet is accelerating towards the sun, but is moving fast enough in a direction that is not towards the sun that it manages not to, creating an (almost always) elliptical orbit like so:

Since Position is related to velocity which is related to acceleration through derivatives, my program will make use of the two following equations for orbital velocity and acceleration towards the sun, they can also account for the varying distances every planet orbits the sun at a particular time – none of the orbits in our solar system are perfectly circular:

$ma = F = \frac{Gm_{sun}m_{planet}}{r^2}$

Since the sun contains 99+% of the Solar System’s mass, this can be approximated to:

$a = \frac{Gm_{sun}}{r^2}$

where, r stands for orbital radius (current distance of planet to sun), m stands for mass, and G for gravitational constant.

For orbital velocity:

$v = \sqrt{\frac{GM}{r}}$

where G is the gravitational constant, M is the mass of the sun, and r is again the orbital radius/distance. This is again a slight approximation that is mostly accurate because of the sun’s huge mass relative to a planet.

Here is a teaser of the GUI of my program will probably look like (work in progress!):

Expect code and some planets to appear tomorrow!