It has not been established whether Ptolemy was born in Alexandria of Egypt or Ptolemais. The encyclopedic nature of his interests is evidenced by his surviving works; but all we know about his life is that he made astronomical observations between 127 and 141 C.E. and probably worked at the Museum of Alexandria. His most famous text, the thirteen-book Compositione matematica or Almagest (c. 140 C.E.), marks the apogee of Alexandrine astronomy. Having proved the immobility and the centrality of the Earth in the universe, Ptolemy set out the planetary geometric models to which astronomers would refer until the 16th century. To explain the planets' longitudinal movements, he transformed the deferents of the epicyclical theory of Apollonius of Perga into eccentric orbits and introduced equants. To account for the planets' latitudinal shifts as well, he tilted the deferents and epicycles. In two successive works, the Manual Tables and Hypotheses on the Planets, Ptolemy compiled a practical compendium of the numerical tables of the Almagest and outlined the architecture of the universe. Enclosed in the sphere of fixed stars, the planetary models were stacked above the Earth in a canonical order: Moon, Mercury, Venus, Sun, Mars, Jupiter, and Saturn. In a third work, Tetrabiblos, Ptolemy blended Babylonian and Egyptian beliefs about the astral influences on human life, laying the foundations of western astrology. Two brief works, the Analemma and the Planisphere, discuss specific problems of projective mathematics: how to determine the length of the solar shadows on a plane, and how to plot the stereographic projection of the celestial sphere. Projective mathematics are also dealt with in the eight books of the Geography. Not only does Ptolemy recommend the use of longitude and latitude to determine the points of the globe; but, alongside a list of localities with their coordinates, he gives two cartographic projections for preparing accurate maps of the inhabited regions. Light and colors are the topic of the Optics, a treatise in five books of which parts have been lost. Defending the theory that vision is due to a flow emanating from the eye, Ptolemy analyzed the reflection of light on flat and spherical mirrors, and its refraction when it crosses the surface between two transparent media. His contribution here was to find the first known mathematical relationship between the angles of the rays of refracted light and incident light. Lastly, his three books on the Harmonics document the most ancient musical theories.