A theory of libration