The system has three degrees of freedom and these are taken as the angle that each pendulum makes with the vertical. The three equations of motions were found using the Lagrangian method and solved numerically in their nonlinear form using the built-in Mathematica function NDSolve.
No damping and no friction is used. You can adjust the masses of the pendulums, the initial conditions, and the spring stiffness coefficients. The Demonstration runs for 20 seconds then starts over again from the beginning; you can adjust the speed with a slider. The kinetic and potential energy levels are displayed at the top as the system runs. The total energy remains constant. When you set the the spring sti?ness to zero, the spring is removed and the bar becomes a freely moving physical pendulum. All units are in SI