Understanding Newton's cradle. I: modelling the ideal cradle