Simulation of the three-body problem

Beijing Institute of Technology | Ming-Jian Li

The following MATLAB code is a companion code for the course on Artificial Intelligence and Simulation Science. It functions to calculate the trajectories of three celestial bodies under the influence of mutual gravity, with time integration performed using the forward Euler method.

The results are as follows.