Compare Double Pendulums

previous next

Compares two double pendulum simulations that are run simultaneously.

You can modify the starting angles and gravity. The right pendulum can be dragged with a spring force by clicking your mouse near it. You can change the separation between the pendulums to compare them more easily.

The two simulations being run are:

  1. The theoretically accurate RigidDoublePendulumSim shown in blue on the left.
  2. The equivalent double pendulum using the 2D Rigid Body Physics Engine shown in red on the right.

The purpose is to show that the two are closely equivalent, which demonstrates the accuracy of the physics engine. Although two very different simulation methods are used, we get pretty much the exact same result.

The angles shown in the graphs are modified for the physics engine version so that they are equivalent to the corresponding RigidDoublePendulumSim angles.

Also available: source code, documentation and how to customize.

previous next Valid HTML 4.01