a model of a pendulum