The Cartesian coordinates of the Sun in the horizontal coordinate system can be determined by successive changes of bases.
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:
Similarly, for rotation of an angle α around the X axis:
And for rotation by the angle α around the Y axis:
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:
where:
: Latitude of the place of observation
: Local mean sidereal time
: Axial tilt
: Ecliptic longitude of the Sun
Inclined and declined sundial
The Cartesian coordinates of the Sun in the system of coordinates bound to an inclined sundial of given declination are:
where:
: declination of the plane of the sundial
: inclination of the sundial, that is, the angle of the normal with respect to the zenith