An open API service indexing awesome lists of open source software.

https://github.com/pmocz/nbody-python

Vectorized N-body code (Python)
https://github.com/pmocz/nbody-python

astrophysics n-body scientific-computing tutorial

Last synced: 6 months ago
JSON representation

Vectorized N-body code (Python)

Awesome Lists containing this project

README

          

# nbody-python
Vectorized N-body code (Python)

## Create Your Own N-body Simulation (With Python)

### Philip Mocz (2020) Princeton University, [@PMocz](https://twitter.com/PMocz)

### [📝 Read the Algorithm Write-up on Medium](https://medium.com/swlh/create-your-own-n-body-simulation-with-python-f417234885e9)

Simulate orbits of stars interacting due to gravity

Code calculates pairwise forces according to Newton's Law of Gravity

```
python nbody.py
```

![Simulation](./nbody.png)