The first sundials appeared in ancient Egypt, where they developed into two broad categories: monumental and portable.
The first known portable sundial dates from about 1500 B.C.E. The length of the shadow cast by an index on a horizontal rule gave the morning time and, when the instrument was turned around, the afternoon time. The first monumental sundials consisted of large obelisks: from the direction and length of the shadow cast on the ground, one could determine the time of day.
Ancient Greece and the Roman Empire saw the development of ordinary sundials, which also functioned on the principle of the cast shadow. The time of day is indicated by the shadow of the style, or gnomon, that touches the hour lines drawn inside a spherical surface, or on a horizontal or vertical plate.
With the revival of projection studies, the Renaissance produced sundials in more curious shapes: goblet, octahedron, dodecahedron, and cylinder. The style that cast the shadow was shaped like a pin, flag, or triangle. In some pocket sundials, the style consisted of a wire stretched between the lid and the base. A small compass enabled the user to point the device quickly in the right direction.
New monumental sundials were installed in the main cathedrals. Small holes were made in the façade, through the roof, or in the dome to project a sunbeam on a meridian line drawn on the floor. The light ray fell at the center of the line at noon exactly. This made it possible to reset mechanical clocks, whose precision was no match for astronomical clocks.