The swinging pendulum