Skip to content

ysudhansh/physics-simulation

 
 

Repository files navigation

forthebadge made-with-python

KWoC 2018

  This is a simple physics engine module made using pygame in python.

It is based on some physics phenomenon and mathematical expressions which defines movement after collision between particles, gravitational force on particles and spring function to make a chain of particles to work them as spring. for example: three particles together will act as triangle.

To use this module in your file download it in the folder where you are working and import PyParticle.py in your file.

other files are example of using PyParticle, one just need to place pyparticle.py in current folder/directory. No need to download other files

Below all examples are created using PyParticle module which enables to write less number of lines code.

Some of the main features of this it defines the movement of particles in space and provides ability to zoom-in and zoom-out

space particle

This programm shows the effect on speed of particles after collision depending on their mass

space particle

Below image shows the spring function in action

space particle

To use this module in your file download it in the folder where you are working and import PyParticle in your file** You can call its function by passing arguments using name of function

         **Referred to example programs to see how to call the function in PyParticle module**

Licensed under MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%