This Demonstration models the dynamical behavior of a pendulum connected to a cart that is, in turn, attached to a spring. The path of the pendulum bob and the position and speed of the cart and the pendulum can be traced as you vary the parameters of the system. The spring-cart-pendulum system has two degrees of freedom: the horizontal position of the cart and pendulum and the angle between the pendulum's rod and the vertical . In the absence of friction, we have the following equations of motion ( is acceleration due to gravity):