computation of flat sundials. fer j. de vries
The aim of the main procedure is to convert a given sun's position, defined
by the angle of declination decl and the sun's hourangle
t into the coordinates x, y of the shadow
point of the (pin) gnomon or to output 'point isn't real'.
Just simply
calculate the values x0,y0,z0, x1,y1,z1, x2,y2,z2, x3,y3,z3, and finaly x,y as
in the 5 routines below.
In these routines you see 2 decision points to find
out if a point is or isn't real.
In : phi, g, i, d, decl, t
Out : x, y or 'point isn't real'
| x0 = sin t . cos decl | translation decl, t into x0, y0, z0 |
| y0 = cos t . cos decl | |
| z0 = sin decl | |
| R = 90 - phi | translation x0, y0, z0, into x1, y1, z1 |
| x1 = x0 | by rotation around x-axis through angle 90 - phi |
| y1 = y0 . cos R - z0 . sin R | |
| z1 = y0 . sin R + z0 . cos R | |
| if z1 < 0 point isn't real: sun is beneath the horizon. | |
| R = d | translation x1, y1, z1, into x2, y2, z2 |
| x2 = x1 . cos R - y1 . sin R | by rotation around z-axis through angle d |
| y2 = x1 . sin R + y1 . cos R | |
| z2 = z1 | |
| R = i | translation x2, y2, z2, into x3, y3, z3 |
| x3 = x2 | by rotation around x-axis through angle i |
| y3 = y2 . cos R - z2 . sin R | |
| z3 = y2 . sin R + z2 . cos R | |
| if z3 <= 0 point isn't real: sun isn't above the dial. | |
| x = x3 . g / z3 | translation x3, y3, z3, into x, y |
| y = y3 . g / z3 | these are the wanted coordinates of the shadow point. |
Remarks:
It is advisable to program each of the 5 routines separately rather than as one combined.
For the shadow points, you should bear in mind the desired maximum value for x and y. Otherwise you may perhaps calculate points that are very far away from your dial.
