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
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 gravipython-0.0.4.tar.gz.
File metadata
- Download URL: gravipython-0.0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13b98fd9673fcbe3bb1179a409a8b34de01dde7638fc29282b0720b239bebb61
|
|
| MD5 |
a02117b78590b6574773fc4e3827c425
|
|
| BLAKE2b-256 |
19586e13e0f100f0109cc0d91836f19504634cf17d2bcde4e3eb4aab16542415
|
File details
Details for the file gravipython-0.0.4-py3-none-any.whl.
File metadata
- Download URL: gravipython-0.0.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d380ecefaf3ad2ce272ffe31b95e02a1f4bffb97b0afe4034b82710c42438521
|
|
| MD5 |
5ea40e319db99d3a7135963bedcd7cab
|
|
| BLAKE2b-256 |
187dc06168918edcebbd2ab9ced0094ed80490e96f821cce4c56339659ebd0b2
|