Skip to content

dnbk302/Ingen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ingen

About

This is a javascript physics simulation engine. I have created this to explore various real world simulations and gain insights on workings of various simulations engines.

The current state of this simulation engine can model forces like gravity, materials like strings(using these as building blocks other objects can be created), rotation based on the angular momentum of the bodies, and boundary collision detection.

Project Structure

I have used HTML canvas for the display and Javascript for the simulation logic. The core logic of the engine is present in particle.js(It is well commented feel free to explore). All the calculations required for simulations are vector-based so as to provide better readability and maintain similarity to other physics engines.

Usage

Each animation is separated to a different javascript file. In the index.html the similation engine logic is loaded first and then you can load the file containing the required simulation.

Simulations

  • Cloth simulation

  • A free falling object with rotation.

  • Planetary simulation

The object at the center has large gravitational pull and the other objects are initalized with a velocity. The centrifugal force and gravity keep each other balanced.

  • Multiple gravitational pulls on objects in motion

About

Various Implementations of physics engines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published