Skip to content

A point mass physics engine written entirely in Python with Pygame.

License

Notifications You must be signed in to change notification settings

22yeets22/Soft-Body-Physics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soft-Body-Physics

A customizable, interactive point mass physics engine written entirely in Python with Pygame.
Soft Body Simulation Thumbnail

Demos

  • Bridge Simulation: image
  • Cloth Simulation: image
  • Earthquake Simulation: image

Features

  • Simulates soft-body physics using point masses and springs.
  • Supports 2D physics with realistic deformation and elasticity.
  • Mouse interaction for dragging and manipulating objects.
  • Collision detection with walls.
  • Adjustable parameters for stiffness, damping, and gravity.
  • Debug mode!
  • A simulation class for ease of use and parameter control.
  • Quick reset!

Requirements

  • Python 3.8 or higher
  • Pygame 2.0 or higher

Controls

  • Left Mouse Button - Drag points or objects.
  • Space - Resets the simulation with the reset function provided by the user.

Customization

Modify constants in config.py to tweak physics properties like gravity, damping, and stiffness.

About

A point mass physics engine written entirely in Python with Pygame.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages