Coder Social home page Coder Social logo

jupiter2653 / orbit-simulator Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 87 KB

Python program using the 2nd law of Newton to simulate in real time gravitational interactions between two or more celestial bodies with a decicated UI. This program is our work for our informatic class final project.

License: Apache License 2.0

Python 100.00%
space orbit-simulator newton formulas gravity gravity-simulation gravitational-simulations planet simulation python3

orbit-simulator's Introduction

Orbit simulator

Python program using the 2nd law of Newton to simulate in real time gravitational interactions between two or more celestial bodies with a decicated UI. This program is our work for our informatic class final project.

Operating process

For each frame, the system computes the position of each object in the next frame considering a movement vector to which the variation of the speed vector has been added considering the following formulas :
Newton 2nd Law
acceleration formula

Installation

Windows

This guide was tested on Windows 10

  1. Install the latest release here. If you want to, you can also clone this repository but the content might not be production ready.
  2. Extract all the files from the compressed folder.
  3. Install the dependencies by typing py -m pip install -r requirements.txt in the directory in which you exctracted the files.
  4. Launch main.py.
  5. Enjoy !

Usage

Once launched, you can add a spacial object by clicking on "Add Spacial Object". You can the choose to use a preset or a personalized object but you will have to specify the movement vector (the movement in x and y in m/s), and the x and y coordinates.
When the spacial object is added, it will start moving following the vector you specified and the forced which are applied to it. You can pause it by pressing the Play/Pause logo.
You can also change the parameters of the object on the fly thanks to the left panel. If you want to change the speed you need to pause the live updating by clicking the "Pause" button. Then, like all the other parameters, you will have to press "Ok" to apply changes. You can also change the position of the object by dragging and dropping the object.

Credits

  • @Everheartt
  • @jupiter2653

orbit-simulator's People

Contributors

everheartt avatar jupiter2653 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

hosna-fadaei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.