Git Product home page Git Product logo

particle-colision-simulator's Introduction

Particle Collision Simulator

To run a collision simply run the shell script:

#!/bin/sh
python3 main.py

This program calcualtes collisions as they happen not premptively meaning that once 100+ particles are being rendered a powerful computer is required.

To add or delete particles edit the particles.json this is done by creating a new row in particles like this:

{
	"x" :511,
	"y" : 511,
	"x_velos" : -1,
	"y_velos" : -1,
	"mass" : 2,
	"color" : (0, 0, 0)
},

Where x is the x coordinate start, y is the y coordinate start and then the x and y velocity. The mass is the mass of the particle and is also proportional to the radius of the sphere.

Alternatively you can run the shell script:

#!/bin/sh
python3 particle_setup.py

Now you are able to use a user interface to add particles or reset the json file. The user interface only allows for the addition of particles or clearing the build folder (removes all particles) so a new simulation can be set up.

The tests module cannont be run in its state it simply stores test used in the development of the code in order for them to run move them into the same directory as the code they're testing.

particle-colision-simulator's People

Contributors

caasitroplla 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.