Skip to content

topaz1008/double-pendulum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Double pendulum simulation in Javascript.

Live Interactive Demo

The demo shows how very small changes in initial conditions can make for a very different behaviour of the system in a very short time; thus making it a chaotic system.

The demo starts with 2 pendulums using the same initial conditions, one pendulum has one of its starting values changed by EPSILON (configurable) (default is 0.0001)

even with that small of a change the different pendulums will start to diverge after about 5-7 seconds.

Solver test; A graph plotter with several equations; was used in developing NDSolve numerical differential equations solver.

More information about the math and equations of motion can be found on Wikipedia and Wolfram science world.

NDSolve class

A simple numerical differential equations solver. the solver integrates in real time.

Supports the Euler forward method, and the classical Runge-Kutta method (RK4).

Euler's method is a very simple and fast method to numerically solve an ODE. The downside is that it is not very accurate and requires using a very small step size.

Runge-Kutta on the other hand is much more involved, but its very fast and very accurate.

TODO

  • Allow switching graph types on-the-fly
  • Implement some basic UI components like buttons and/or drop-downs for selecting different graphs
  • Allow all values to be manipulated in real time and connect all ui elements.
  • Simplify and encapsulate dom event handling and value syncing and resetting.
  • Consider re-write in Typescript.

About

A chaotic double pendulum simulation in Javascript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published