The length and position of the shadow then depends on both the time of year and the time of day. Local noon can be found from the time when the shadow is shortest. At this time the Sun is highest in the sky and crossing the meridian.
However, shadow sticks are not good clocks - the azimuth of the Sun's shadow at a given time changes throughout the year with the Sun's declination.
Sundials have a gnomon which points to the celestial pole. The gnomon's upper edge is parallel to the rotation axis of the Earth. Time is indicated by the shadow of the gnomon on a dial plate.
The angle of the gnomon means that the shadow direction is independent of the declination of the Sun in the sky and on any day of the year. The sundial will give roughly the correct 'clock' time on any day of the year.
The gnomon casts its shadow on the horizontal dial face
There are several different kinds of sundials. Equatorial sundials have a dial plate which is at right angles to the gnomon, in the plane of the celestial equator. The time markings are equally spaced out, with a full circle marking 24 hours. Hour markings are then at 15° intervals.
Vertical sundials have a vertical dial plate and projected hour markings. In all sundial cases the gnomon points to the celestial pole. In the UK the shadow of the gnomon moves anticlockwise around the dial plate.
A vertical sundial. Click to enlarge
The equation of time
Time indicated by a sundial is known as apparent solar time. However the apparent motion of the Sun against the background stars varies in speed and the length of the solar day is usually shorter or longer than 24 hours. This gives rise to a varying difference between clock time and apparent solar time, the value of which is described by the equation of time.
Firstly, the speed that the Earth moves along its orbital path depends on its distance from the Sun. For example, the Earth is closer to the Sun in January than July so its orbital speed is higher. The Earth then has to turn through slightly more than average for the Sun to return to the meridian (see The orbit of the Earth in 'Earth introduction'). In July the Earth is further away so moves more slowly around the Sun. Therefore the Earth has to rotate through a smaller angle for the Sun to return to the meridian.A second effect is the apparent motion of the Sun along the ecliptic rather than the celestial equator. This results from the tilt of the Earth's axis with respect to the ecliptic plane (the obliquity). It causes a variation in the rate that the Sun moves from west to east against the star background and another change in the apparent length of the solar day.
Sundials show apparent solar time. The equation of time converts this to local mean time - based on the imaginary mean Sun that moves eastwards along the ecliptic at a constant rate.