Giter VIP home page Giter VIP logo

a-simulation-of-planets's Introduction

a-Simulation-of-Planets

In order to run this project you need module Pygame how to install this module is written below

pip install pygame

Next, What you can do in the project you can create planets and watch how planets behave with gravitation so, you need to know hotkeys:

  • Z - Decreases time speed
  • X - Increases time speed
  • O - Turn on the orbit and turn off the orbit
  • LMB - create a planet
  • TAB - changes a color of planet when you creating a planet
  • Mouse wheel - zoom
  • Mouse wheel button - moves the camera

If you want change limit of allowed lines just change the variable

your_limit = 3000

or you want to add a planet to the solar system find class Planets and create Planet after that add the variable to the list

Example:

planet = Planet(x, y, radius, color, mass)

if you pass value only on axis x: planet.y_vel = your_speed or if you pass value only on axis y: planet.x_vel = your_speed

neptune = Planet(30.06 * Planet.AU, 0, 14, DEEP_BLUE, 24.622 ** 10 * 6)
neptune.y_vel = 5.4349 * 1000

then add the varible to the list

planets = [sun, earth, mars, mercury, venus, jupyter, saturn, uranus, neptune]

a-simulation-of-planets's People

Contributors

afutik avatar farkon00 avatar

Stargazers

निशान्त मिश्रा avatar Roman avatar  avatar  avatar

Watchers

 avatar

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.