Claudius Ptolemy model of retrograde motion using epicycles. Claudius also put some smaller wheels within wheels to give his model some better precession.
The almost periodic functions can always be approximated in this epicyclical fashion.