a little simulation for the gravitational two body problem
Project description
Two Body Problem
a small simulation
Welcome!
I wrote a small program in Python to simulate the two body problem. You type in some parameters, like mass, radius, velocity and distance. The program will show you a visualization of the simulation.
This program is command line only. If you want a graphical user interface, visit this GitHub page.
Table of Contents
Installation Instructions
(You may need Microsoft Visual C++ to be able to run the program, so install it from here if needed.)
via PyPi
The Python package manager pip will install the last uploaded version from the Python Package Index PyPi. This will not always be the latest version, so if you want to install all the latest features, install it from GitHub (see below).
- Make sure Python and pip are installed correctly.
- Run these commands from a command line:
pip3 install --upgrade pip setuptools wheelpip3 install --upgrade twobodyproblem
- Now, the program is runnable with
python -m twobodyproblemorpython3 -m twobodyproblem.
via GitHub
- Make sure Python and pip are installed correctly.
- Make sure Git SCM is installed correctly.
- Run these commands from a command line:
mkdir TwoBodyandcd TwoBodygit clone https://github.com/Two-Body-Problem/twobodyproblem-simulation-python.gitpip3 install --upgrade pip setuptools wheelpip3 install twobodyproblem-simulation-python
- Now, the program is runnable with
python -m twobodyproblemorpython3 -m twobodyproblem.
Usage
To learn more about how to run the program with different options,
run python -m twbodyproblem -h or python3 -m twbodyproblem -h respectively.
Run the program with python -m twobodyproblem or python3 -m twobodyproblem.
First, you will have to input options and values. The options define the particular behavior of the simulation, the values define the dimensions (i.e. mass, radius, distance, velocity) of the bodies.
The simulation will start automatically after the last input.
During the simulation, you are able to pause, un-pause and stop the simulation with the accordingly named buttons below the black rectangle. The restart button restarts the whole program, not just the simulation.
The sliders below the buttons can be used to magnify the bodies in the simulation. This magnification does not affect the physics, it is only a visual help.
Participation in this README is always welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file twobodyproblem-2.0.0.tar.gz.
File metadata
- Download URL: twobodyproblem-2.0.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f29662b0059ae6b1567b926e82a063f5bbf66fcec0f5c003eac1dde6c39987
|
|
| MD5 |
b15900ea7213ca79c19d25f31d44e495
|
|
| BLAKE2b-256 |
37536e16246ec67d2b5bd9b72b163e0d638e63affb313253787bdc5d502daee9
|
File details
Details for the file twobodyproblem-2.0.0-py3-none-any.whl.
File metadata
- Download URL: twobodyproblem-2.0.0-py3-none-any.whl
- Upload date:
- Size: 224.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf4fc3b64d830ad4c1a6e27fe831c8a5ae9387c75e35217c84ebaef900a518d
|
|
| MD5 |
353bfcf2515c08f7153a1bc9935fd61b
|
|
| BLAKE2b-256 |
96c41751cdd63caf8976e4d50e6d46a7b0a8733c4830d40816a51d2104a7c4f8
|