In a broader sense, a sundial is any device that uses the Sun's altitude or azimuth (or both) to show the time. In addition to their time-telling function, sundials are valued as decorative objects, literary metaphors, and objects of mathematical study.
There are several different types of sundials. Some sundials use a shadow or the edge of a shadow while others use a line or spot of light to indicate the time.
The shadow-casting object, known as a gnomon, may be a long thin rod or other object with a sharp tip or a straight edge. Sundials employ many types of gnomon. The gnomon may be fixed or moved according to the season. It may be oriented vertically, horizontally, aligned with the Earth's axis, or oriented in an altogether different direction determined by mathematics.
Given that sundials use light to indicate time, a line of light may be formed by allowing the sun's rays through a thin slit or focusing them through a cylindrical lens. A spot of light may be formed by allowing the sun's rays to pass through a small hole or by reflecting them from a small circular mirror.
Sundials also may use many types of surfaces to receive the light or shadow. Planes are the most common surface, but partial spheres, cylinders, cones and other shapes have been used for greater accuracy or beauty.
Sundials differ in their portability and their need for orientation. The installation of many dials requires knowing the local latitude, the precise vertical direction (e.g., by a level or plumb-bob), and the direction to true North. Portable dials are self-aligning: for example, it may have two dials that operate on different principles, such as a horizontal and analemmatic dial, mounted together on one plate. In these designs, their times agree only when the plate is aligned properly.