Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 1.08 KB

README.md

File metadata and controls

25 lines (14 loc) · 1.08 KB

Gravity

Orbits and Gravitational simulations using OpenGL and C.

The Algorithm

Firstly, the program calculates the gravitational force between all the celestial bodies by using this formula:

by using this other formula, the force formula:

the program can get the acceleration of a body:

now, apply this acceleration to this movement equation:

Example:

window output