Skip to content

tharun143/physics-simulation

 
 

Repository files navigation

  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**

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%