Simple physics library for the Processing language, written in pure processing, in a single file.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
1-header.pde
BHTree.pde
BounceEdge.pde
Connector.pde
Coulomb.pde
DragLaw.pde
DryFriction.pde
EdgeLaw.pde
Example.pde
Gravity.pde
Hooke.pde
KillEdge.pde
Law.pde
MotionLaw.pde
Particle.pde
README.md
StokesDrag.pde
Thing.pde
Universe.pde
WrapEdge.pde
bake

README.md

ScrambledPhysics

ScrambledPhysics is a simple physics engine written in 100% native Processing. The aim of the project is to create a portable (within Processing) which is good enough for basic physics simulations.

Installation

  1. Get the code by either
    • Cloning the git repository to a directory
    • Downloading the zip file
  2. Open Processing and create a new project (called anything EXCEPT ScrambledPhysics
  3. From the command line, Finder, Explorer or whatever, copy / link the file ScrambledPhysics.pde into the new Processing directory.
  4. Build your universe...

Key Concepts

Universe

Every simulation has a universe. Universes have laws and things added to them.

Laws

Laws affect the universe simulation. Some examples include:

  • Gravity - apply a force to every particle in the universe in proportion to its mass, and in the direction Gravity is pointing.
  • Coulomb - apply a force to every particle based on its charge, and the charges of every other particle in the system.

Things

Particle