Skip to content

fflopsi/twobodyproblem-gui

Repository files navigation

Two Body Problem – GUI

The GUI to the simulation

Welcome!

This is the repository for the graphical user interface of this repository containing the base simulation. For more information about the whole program, go there.

In this additional GUI, there are more possibilities than in the normal (CLI) program. For example, you can choose from presets instead of typing in your own parameters, have a more convenient interface to edit them, and more.

Installation

(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).

  1. Make sure Python and pip are installed correctly.
  2. Run these commands from a command line:
    1. pip install --upgrade pip setuptools wheel
    2. pip install --upgrade twobodyproblem_gui
  3. Now, the program is usable with python -m twobodyproblem_gui.

Via GitHub

  1. Install the base program
  2. Run these commands from a command line:
    1. cd TwoBody (or whatever folder you stored the base program files in)
    2. git clone https://github.com/fflopsi/twobodyproblem-gui.git
    3. pip install ./twobodyproblem-gui/
  3. Now, the program is runnable with python -m twobodyproblem_gui.

Usage

To learn more about how to run the program with different options, run python -m twbodyproblem_gui -h.

To learn more about the base program / the simulation itself, read this first.

Run the program with python -m twobodyproblem_gui on a command line.

The program will open a window with some input fields. This is the main window where you input the values. To save values, press Ctrl+S. The values will then be saved into a file. If you do this action repeatedly, the previous contents of the file (i.e. the saved values) will be overwritten! To load saved values from this file, press Ctrl+L. To save or load values through a file dialog, press Ctrl+Shift+S or Ctrl+Shift+L. It works the same way for saving and loading settings from the settings window (open it with Ctrl+I).

You can also select from a few presets (e.g. Sun, Moon, Earth) to fill in some values instead of typing your own. To do so, press Ctrl+E to select from the drop-down menus and press one of the two buttons in the lower right corner.

To start the simulation, press the button in the lower right corner in the main window.