Skip to content

(Simple) simulation of the dynamics of 3 planets interacting with each other, due to gravitational attraction.

Notifications You must be signed in to change notification settings

danielsanjosepro/three_planets_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Three Planets Simulation 🌍

(Simple) simulation of the dynamics of 3 planets interacting with each other, due to gravitational attraction.

To change the initial conditons of the simulation, change the parameters in the first section:

mi = ...;                              % the ith mass
xi0 = ...; yi0 = ...; zi0 = ...;       % initial coordinates of the ith body
vxi0 = ...; vyi0 = ...; vzi0 = ...;    % initial velocity of the ith body

The program solve a system of coupled ODEs obtained using a simple model, where the acceleration of the i-th mass only depends on the gravitational force of the other masses:

The code generates an avi-format video. Some examples are provided in the repository.

About

(Simple) simulation of the dynamics of 3 planets interacting with each other, due to gravitational attraction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages