Skip to content

This project simulates the interactions between celestial bodies using Newton's Law of Universal Gravitation. It employs the SDL3 library for rendering graphics.

License

Notifications You must be signed in to change notification settings

Aurelien-vr/ThreeBodySimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three Body Simulation

2025-11-09-185325_hyprshot

This project simulates the interactions between celestial bodies using Newton's Law of Universal Gravitation. It employs the SDL3 library for rendering graphics.

Introduction

The Three Body Simulation aims to visualize the gravitational effects between three celestial bodies. It provides insights into complex orbital mechanics and the chaotic nature of three-body systems.

Features

  • Simulates gravitational interactions between three bodies.
  • Uses SDL3 for graphical rendering.
  • Simple to build and run.

Build

To build the project, ensure that the dependencies for SDL3 are satisfied. You can follow these steps:

git clone https://github.com/Aurelien-vr/ThreeBodySimulation/
cd ThreeBodySimulation
make
./tbs

Usage

Once built, run the simulation with ./tbs. You will see a graphical representation of the three bodies interacting through gravity. You can adjust the initial parameters in the code to explore different scenarios.

Possible improvements

  • Collision Handling: Currently, the simulation stops when bodies collide. Future work will include handling collisions more realistically.

  • Optimization: Performance enhancements may be necessary as the simulation scales to include more celestial bodies.

:/

There is a memory leak that I haven't been able to identify.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

This project simulates the interactions between celestial bodies using Newton's Law of Universal Gravitation. It employs the SDL3 library for rendering graphics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published