A gnomon (, from Greek , gn?m?n, literally: "one that knows or examines") is the part of a sundial that casts a shadow. The term is used for a variety of purposes in mathematics and other fields.
A painted stick dating from 2300 BC that was excavated at the astronomical site of Taosi is the oldest gnomon known in China. The gnomon was widely used in ancient China from the second century BC onward in order determine the changes in seasons, orientation, and geographical latitude. The ancient Chinese used shadow measurements for creating calendars that are mentioned in several ancient texts. According to the collection of Zhou Chinese poetic anthologies Classic of Poetry, one of the distant ancestors of King Wen of the Zhou dynasty used to measure gnomon shadow lengths to determine the orientation around the 14th century BC. The ancient Greek philosopher Anaximander (610-546 BC) is credited with introducing this Babylonian instrument to the Ancient Greeks. The ancient Greek mathematician and astronomer Oenopides used the phrase drawn gnomon-wise to describe a line drawn perpendicular to another. Later, the term was used for an L-shaped instrument like a steel square used to draw right angles. This shape may explain its use to describe a shape formed by cutting a smaller square from a larger one. Euclid extended the term to the plane figure formed by removing a similar parallelogram from a corner of a larger parallelogram. Indeed, the gnomon is the increment between two successive figurate numbers, including square and triangular numbers. The ancient Greek mathematician and engineer Hero of Alexandria defined a gnomon as that which, when added to an entity (number or shape), makes a new entity similar to the starting entity. In this sense Theon of Smyrna used it to describe a number which added to a polygonal number produces the next one of the same type. The most common use in this sense is an odd integer especially when seen as a figurate number between square numbers.
Perforated gnomons projecting a pinhole image of the Sun were described in the Chinese Zhoubi Suanjing writings (1046 BCE--256 BC with material added until circa 220 AD). The location of the bright circle can be measured to tell the time of day and year. In Arab and European cultures its invention was much later attributed to Egyptian astronomer and mathematician Ibn Yunus around 1000 AD. Italian astronomer, mathematician and cosmographer Paolo Toscanelli is associated with the 1475 placement of a bronze plate with a round hole in the dome of the Cathedral of Santa Maria del Fiore in Florence to project an image of the Sun on the cathedral's floor. With markings on the floor it tells the exact time of each midday (reportedly to within half a second) as well as the date of the summer solstice. Italian mathematician, engineer, astronomer and geographer Leonardo Ximenes reconstructed the gnomon according to his new measurements in 1756.
In the Northern Hemisphere, the shadow-casting edge of a sundial gnomon is normally oriented so that it points due northward and is parallel to the rotational axis of Earth. That is, it is inclined to the northern horizon at an angle that equals the latitude of the sundial's location. At present, such a gnomon should thus point almost precisely at Polaris, as this is within 1° of the north celestial pole.
On some sundials, the gnomon is vertical. These were usually used in former times for observing the altitude of the Sun, especially when on the meridian. The style is the part of the gnomon that casts the shadow. This can change as the Sun moves. For example, the upper west edge of the gnomon might be the style in the morning and the upper east edge might be the style in the afternoon. A three-dimensional gnomon is commonly used in CAD and computer graphics as an aid to positioning objects in the virtual world. By convention, the x-axis direction is colored red, the y-axis green and the z-axis blue. NASA astronauts used a gnomon as a photographic tool to indicate local vertical and to display a color chart when they were working on the Moon's surface.