Skip to content

Commit

Permalink
Add gif to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoelzle committed Mar 8, 2024
1 parent 49f3ef2 commit 403809c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# NBODYX: Simulating N-Body Systems with Jax

This repository derives ODEs for N-Body systems and simulates them using Jax. The main goal is to provide a simple and efficient way to simulate N-Body systems using Jax.
It is heavily inspired by the amazing [ThreeBodyBot](https://github.com/kirklong/ThreeBodyBot) and specifically the [NumericsTutorial](https://github.com/kirklong/ThreeBodyBot/blob/master/NumericsTutorial/NumericalDynamicsTutorial.ipynb).

![3-body problem](assets/three_body.gif)

## Installation

Expand All @@ -25,7 +28,7 @@ conda install -c conda-forge ffmpeg

## Usage

The following example simulates a 3-Body system:
The following example simulates a 3-body system:

```python
from diffrax import diffeqsolve, Dopri5, ODETerm, SaveAt
Expand Down
Binary file added assets/three_body.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/outputs/three_body.mp4
Binary file not shown.
3 changes: 2 additions & 1 deletion examples/simulate_three_body_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
500,
500,
video_path="examples/outputs/three_body.mp4",
speed_up=ts[-1] / 10,
speed_up=1.0,
skip_step=5,
x_min=x_min,
x_max=x_max,
timestamp_unit="s",
Expand Down

0 comments on commit 403809c

Please sign in to comment.