https://github.com/a-llison-lau/three-body-problem
A visualization of the classic three body problem
https://github.com/a-llison-lau/three-body-problem
physics physics-simulation react three-js threejs typescript
Last synced: 4 months ago
JSON representation
A visualization of the classic three body problem
- Host: GitHub
- URL: https://github.com/a-llison-lau/three-body-problem
- Owner: a-llison-lau
- Created: 2025-01-27T04:04:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T01:14:12.000Z (over 1 year ago)
- Last Synced: 2025-03-24T05:32:37.212Z (over 1 year ago)
- Topics: physics, physics-simulation, react, three-js, threejs, typescript
- Language: TypeScript
- Homepage: https://three-body-problem.vercel.app
- Size: 60.7 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Three Body Problem Visualization
We simulate the restricted Euler problem and visualize known orbits from literature.
The visualization is at [here](https://three-body-problem.vercel.app/).

## 1. Contributing
To contribute to this project, make a fork and,
```
git clone https://github.com//Three-Body-Problem.git
cd Three-Body-Problem
npm install
npm run dev
```
The physics components are located in `src/computation/cpp/` (the python version is also available, but takes significantly longer time to run). To run the simulation,
```
cd src/computation/cpp/
make
./simulation
```
Note that `num_output_steps` refer to the number of 0.01 units of time steps (not `dt` units of time steps). For more accurate simulation results, $\mathrm{d}t < 0.001$ is recommended. The results of the simulation are precomputed with `num_steps = 3600`, `dt = 0.00001` and stored in `public/position_files//`, where `` refers to the order of the symplectic integrator.