Skip to main content

A python module for simulating planets trajectories in 2D.

Project description

README.md

This python module is a basic module that can be used for small simulations.

v 0.0.1

class SolarSystem(width, height, **kwargs):

**kwargs :

  • collisions=True (Set this to False if you want to deactivate collisions)

Used to create a solar system to add stars in your simulation. | | SolarSystem.main(): | | Method that does all the work, don't forget otherwise nothing is going to appear. | Click on A to spawn an asteroid of 0.000001 solar masses. | Click on D to spawn a red dwarf of 0.35 solar masses. | Click on B to spawn a brown dwarf of 0.07 solar masses. | Click on S to spawn a star of 1 solar mass. | Click on P to spawn a planet of 0.0001 solar masses. | Click on M to spawn a moon of 0.00001 solar masses. | Click on C to spawn a comet of 0.000001 solar masses. | Click on W to spawn a white dwarf of 0.9 solar masses. | Click on R to reset and remove all stars from the screen.

class SolarSystemBody(solar_system, mass, position=(0, 0), velocity=(0, 0), color=(255, 255, 255))

This class allows you to create your own stars. | | From this class are created the classes : | | - Sun | - RedDwarf | - BrownDwarf | - Asteroid | - Planet | - Moon | - Comet | - WhiteDwarf | | Each of these classes can be initialised with the same parameters as SolaSystemBody, except that they have a default value for the mass and a | different one for the color.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gravipython-0.0.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gravipython-0.0.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file gravipython-0.0.3.tar.gz.

File metadata

  • Download URL: gravipython-0.0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for gravipython-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1639d81959e8118c179cdb761e05a8a88387751b231e87c157f3e97478d0c702
MD5 b66d657790c2ae5dfcc460a6b356008d
BLAKE2b-256 8057f9728b82d6ca1104a45cf4c522897d6e0af26a97d28497292678e147b42a

See more details on using hashes here.

File details

Details for the file gravipython-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: gravipython-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for gravipython-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c28808649af71bb34f0831aaecfc8ef1b493b1cc590264482bd8bb7d2f1bcb6
MD5 ceda8e640a39db0aa135f8f8d7d29390
BLAKE2b-256 9eaf9b8efadfc910a9b010b2d62afe637bb0054565ba14f92608f733a9a96c6b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page