Skip to content

AstroKhet/Orbit-Simulator-2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Multi Object Simulator

A simple Multi-Object gravitational motion simulator made while learning about linear algebra & orbital mechanics

How it works

Create a file in the folder presets/ with the following variables:

  • NAME : Name of simulation
  • TIME_DELTA : Time passed per iteration
  • SPACE_SCALE : Meters per pixel
  • BASE_SPACE_VECTOR : Position of bottom-left coordinate of window (in real scale)
  • object_list : List of objects

This simulation uses Newton's law of universal gravitation to calculate the acceleration of each object, then uses kinematics to simulate their corresponding velocity & displacement.

Demo

Triple Star System Alt Text

Solar System Alt Text

What can be improved/implemented

  • Collision between objects
  • Displaying vectors for each object's velocity and gravitational acceleration
  • Displaying an orbit path
  • Ability to add & drag objects using mouse button
  • Optimization in general

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages