inverted-pendulum icon indicating copy to clipboard operation
inverted-pendulum copied to clipboard

pendulum physics simulation

inverted-pendulum

Physics simulation of a pendulum on a slider. Experimentally using svg driven by code for animation (runs way better in chrome than firefox) and using the classic Runge-Kutta method for integrating the equations of motion. You can also set PD values for a controller that aims to hold the pendulum upright, and easily modify the controller function to whatever you'd like.

CodePen Link

demo