The ancient astronomers believed that the Earth was the centre of the Solar System and that the Sun and planets revolved around it. However there were problems - the planets showed strange looping motions in their orbits.
The Greek scientist, Ptolemy proposed the epicycle model to try to explain this motion.
The planets were thought to travel round the Earth on the small circle called an EPICYCLE whose centre moved round the large circle. The combined motions of P and D accounted for the backward or retrograde motion of the planet P which an observer on Earth would see.