# Gnomonics

Gnomonics (from the ancient Greek word γνώμων, pronounced, meaning 'interpreter, discerner') is the study of the design, construction and use of sundials.
The foundations of gnomonics were known to the ancient Greek Anaximander (ca. 550 BCE), which augmented the science of shadows brought back from Egypt by Thales of Miletus. Gnomonics was used by Greek and Roman architects from 25 BCE for the design of buildings.
Modern gnomonics has its root in the nascent European astronomy of the 16th Century. The first works, in Latin, were published by Sebastian Münster in 1531 and Oronce Fine in 1532, rapidly followed by books in French. At the end of the 17th century, gnomonics developed notably in the application of spherical trigonometry. Several methods, both graphical and analytical, were published in books which allowed the creation of sundials of greater or lesser precision to be placed on buildings and in gardens.
In his Histoire de la Gnomonique ancienne et moderne, Jean-Étienne Montucla sums up gnomonics in these words:
   Qu’on ait douze plans se coupant tous à angles égaux dans une même ligne, et que ces plans, indéfiniment prolongés, en rencontrent un autre dans une situation quelconque, il s’agit de déterminer les lignes dans lesquelles ils le coupent.
   When one has twelve planes all intersecting at equal angles in the same line, and these planes, infinitely produced, meet any other, it is a question of determining the lines which intersect them.

## Analytical gnomonics
### Coordinate system transforms - Change of bases

The Cartesian coordinates of the Sun in the horizontal coordinate system can be determined by successive changes of bases.

#### Expression as transformation matrices

A transformation matrix from a system B to a system B' allows for calculating the coordinates of a point or vector in system B' when its coordinates are known is system B.
For example, to change the system by rotating by an angle α around the Z axis, the coordinates in the new system can be calculated from those in the old system as:
${\begin{pmatrix}\mathrm {X} '\\\mathrm {Y} '\\\mathrm {Z} '\\\end{pmatrix}}={\begin{pmatrix}\cos \alpha &\sin \alpha &0\\-\sin \alpha &\cos \alpha &0\\0&0&1\\\end{pmatrix}}\cdot {\begin{pmatrix}\mathrm {X} \\\mathrm {Y} \\\mathrm {Z} \\\end{pmatrix}}$
Similarly, for rotation of an angle α around the X axis:
${\begin{pmatrix}\mathrm {X} '\\\mathrm {Y} '\\\mathrm {Z} '\\\end{pmatrix}}={\begin{pmatrix}1&0&0\\0&\cos \alpha &\sin \alpha \\0&-\sin \alpha &\cos \alpha \\\end{pmatrix}}\cdot {\begin{pmatrix}\mathrm {X} \\\mathrm {Y} \\\mathrm {Z} \\\end{pmatrix}}$
And for rotation by the angle α around the Y axis:
${\begin{pmatrix}\mathrm {X} '\\\mathrm {Y} '\\\mathrm {Z} '\\\end{pmatrix}}={\begin{pmatrix}\cos \alpha &0&-\sin \alpha \\0&1&0\\\sin \alpha &0&\cos \alpha \\\end{pmatrix}}\cdot {\begin{pmatrix}\mathrm {X} \\\mathrm {Y} \\\mathrm {Z} \\\end{pmatrix}}$

#### Model of the apparent movement of the Sun

The Cartesian coordinates of the Sun in the horizontal system of coordinates can be calculated using change of basis matrices:
${\begin{pmatrix}\mathrm {X} _{h}\\\mathrm {Y} _{h}\\\mathrm {Z} _{h}\\\end{pmatrix}}={\begin{pmatrix}\cos({\frac {\pi }{2}}-\phi )&0&-\sin({\frac {\pi }{2}}-\phi )\\0&1&0\\\sin({\frac {\pi }{2}}-\phi )&0&\cos({\frac {\pi }{2}}-\phi )\\\end{pmatrix}}\cdot {\begin{pmatrix}\cos(LMST)&\sin(LMST)&0\\-\sin(LMST)&\cos(LMST)&0\\0&0&1\\\end{pmatrix}}\cdot {\begin{pmatrix}1&0&0\\0&\cos(-\epsilon )&\sin(-\epsilon )\\0&-\sin(-\epsilon )&\cos(-\epsilon )\\\end{pmatrix}}{\begin{pmatrix}\cos(l_{\odot })\\\sin(l_{\odot })\\0\\\end{pmatrix}}$
where:
$\phi$: Latitude of the place of observation
$LMST$: Local mean sidereal time
$\epsilon$: Axial tilt
$l_{\odot }$: Ecliptic longitude of the Sun

#### Projection of the shadow of a vertical gnomon

Let ${\begin{pmatrix}0\\0\\L\\\end{pmatrix}}$ be the Cartesian coordinates, in the local coordinate system, of the end of a vertical gnomon of length $L$.
The coordinates of the extremity of the shadow in the horizontal plane can be obtained with an affine transform parallel to the line by ${\begin{pmatrix}\mathrm {X} _{h}\\\mathrm {Y} _{h}\\\mathrm {Z} _{h}\\\end{pmatrix}}$ and ${\begin{pmatrix}0\\0\\L\\\end{pmatrix}}$.

#### Inclined and declined sundial

The Cartesian coordinates of the Sun in the system of coordinates bound to an inclined sundial of given declination are:
* ${\begin{pmatrix}\mathrm {X} '_{h}\\\mathrm {Y} '_{h}\\\mathrm {Z} '_{h}\\\end{pmatrix}}={\begin{pmatrix}\cos i&0&-\sin i\\0&1&0\\\sin i&0&\cos i\\\end{pmatrix}}\cdot {\begin{pmatrix}\cos(-D)&\sin(-D)&0\\-\sin(-D)&\cos(-D)&0\\0&0&1\\\end{pmatrix}}\cdot {\begin{pmatrix}\mathrm {X} _{h}\\\mathrm {Y} _{h}\\\mathrm {Z} _{h}\\\end{pmatrix}}$
where:
$D$: declination of the plane of the sundial
$i$: inclination of the sundial, that is, the angle of the normal with respect to the zenith

## Other uses

Gnomonic projection is a map projection where the vanishing point is in the centre of a spheroid.