@@ -477,9 +469,9 @@
Romans split the daylight, from sunrise to sunset, into twelve equal
horae, and the night into twelve more,
grouped into four watches (vigiliae). So an hour stretched in summer and shrank in winter.
- By day this page draws a spherical sundial, a hollow stone globe cut open toward the equator,
- laid out for your latitude. A bronze gnomon hangs from the top of the opening to the centre of the sphere,
- and its tip's shadow marks the hour. The three curves are the winter solstice (bruma), the
+ By day this page draws a spherical sundial: the lower quarter of a hollow stone globe, open toward the equator,
+ laid out for your latitude. A bronze gnomon points out from the centre of its upper edge,
+ and its shadow marks the hour. The three curves are the winter solstice (bruma), the
equinox (aequinoctium) and the summer solstice (solstitium); the dashed line is today's path.
By night, when a sundial is useless, it switches to the water clock of Ctesibius (Vitruvius IX.8):
water drips at a steady rate into a cylinder, and a float lifts a figure whose wand points to the hour
@@ -577,7 +569,7 @@
// of the tip lands diametrically opposite the sun. Everything works in a "dial frame": latitude is
// taken as |lat| and, south of the equator, declination and east-west are mirrored so the dial faces north.
const svgNS = "http://www.w3.org/2000/svg";
- const CX = 200, CY = 166, R = 140, SOLSTICE = 23.44 * rad, REFRACTION = -0.833 * rad;
+ const CX = 200, CY = 30, R = 150, SOLSTICE = 23.44 * rad, REFRACTION = -0.833 * rad;
const el = (tag, attrs, parent) => {
const e = document.createElementNS(svgNS, tag);
for (const k in attrs) e.setAttribute(k, attrs[k]);
@@ -602,13 +594,6 @@
const s = sunVec(lat, dec, f, halfDay);
return toScreen(-s.e, Math.min(0, -s.u));
}
- // Shadow of the hanging rod (from the top of the opening down to the centre) on the inner sphere.
- function rodShadow(s) {
- return range(0, 1, 24).map(h => {
- const b = h * s.u, t = b + Math.sqrt(Math.max(0, b * b - h * h + 1));
- return toScreen(-t * s.e, h - t * s.u);
- });
- }
const toPath = pts => 'M' + pts.map(p => p[0].toFixed(1) + ',' + p[1].toFixed(1)).join('L');
const range = (a, b, n) => Array.from({ length: n + 1 }, (_, i) => a + (b - a) * i / n);
const romanHourMin = (lat, dec) => {
@@ -792,8 +777,10 @@
if (activeCurve === 'today') $('curveInfo').innerHTML = curveText('today');
const sun = sunVec(place.lat, dec, frac, Math.PI * (per.end - per.start) / dayMs);
sun.u = Math.max(0, sun.u);
- $('shadow').setAttribute('d', toPath(rodShadow(sun)));
const [tx, ty] = toScreen(-sun.e, -sun.u);
+ const dx = tx - CX, dy = ty - CY, len = Math.hypot(dx, dy) || 1;
+ const nx = -dy / len, ny = dx / len;
+ $('shadow').setAttribute('d', `M${CX + nx * 2.5},${CY + ny * 2.5} L${tx + nx * .8},${ty + ny * .8} L${tx - nx * .8},${ty - ny * .8} L${CX - nx * 2.5},${CY - ny * 2.5}Z`);
$('shadow').style.display = $('tip').style.display = '';
$('tip').setAttribute('cx', tx);
$('tip').setAttribute('cy', ty);
@@ -804,7 +791,7 @@
function drawNight(now, frac, idx) {
$('sundial').toggleAttribute('hidden', true);
$('clepsydra').toggleAttribute('hidden', false);
- $('curveInfo').innerHTML = 'The drum turns once a year; today faces the pointer';
+ $('curveInfo').innerHTML = '';
buildDrum(place.lat, now);
const rise = Math.min(TRAVEL, frac * nightFrac(place.lat, now) / maxNight * TRAVEL);
waterY = 380 - rise;