In the Ptolemaic system of astronomy, the epicycle (literally: on the circle in Greek) was a geometric model to explain the variations in speed and direction of the apparent motion of the Moon, Sun, and planets. It was designed by Apollonius of Perga at the end of the 3rd century BC. In particular it explained the retrograde motion of the five planets known at the time. Secondarily, it also explained changes in the apparent distances of the planets from Earth.
See more at Wikipedia.org...