Repository navigation
Expand file tree
/
Copy pathmaths.html
More file actions
749 lines (567 loc) · 53 KB
/
Copy pathmaths.html
File metadata and controls
749 lines (567 loc) · 53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="https://sunset.observable.science/maths">
<link rel="icon" href="favicon.ico" sizes="32x32 48x48">
<link rel="icon" href="img/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<title>The maths — Sunset Visualiser</title>
<meta name="description" content="Every formula behind the Sunset Visualiser, the function that implements it, the numbers it produces, and the sources for every constant.">
<link rel="stylesheet" href="css/style.css">
<style>
body { background: var(--page); }
.doc {
max-width: 880px;
margin: 0 auto;
padding: 28px 20px 96px;
font-size: 14.5px;
line-height: 1.62;
}
.doc-head { border-bottom: 1px solid var(--hairline); padding-bottom: 18px; margin-bottom: 8px; }
.doc-head h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; margin: 0 0 6px; }
.doc-head .lede { color: var(--ink-2); margin: 0; max-width: 62ch; }
.doc-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 14px; font-size: 13px; }
.backbar {
position: sticky;
top: 0;
z-index: 20;
margin: -28px -20px 0;
padding: 10px 20px;
background: color-mix(in srgb, var(--page) 88%, transparent);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border-bottom: 1px solid transparent;
}
.backbar.stuck { border-bottom-color: var(--hairline); }
.backbtn {
display: inline-flex; align-items: center; gap: 7px;
padding: 6px 14px 6px 11px;
border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface);
color: var(--ink); text-decoration: none; font-weight: 500;
}
.backbtn:hover { border-color: var(--axis); }
.doc h2 {
font-size: 19px;
font-weight: 620;
letter-spacing: -0.01em;
margin: 44px 0 4px;
padding-top: 18px;
border-top: 1px solid var(--hairline);
}
.doc h2 .n { color: var(--muted); font-weight: 500; margin-right: 8px; }
.doc h3 { font-size: 15px; font-weight: 620; margin: 28px 0 4px; }
.doc p { margin: 10px 0; max-width: 74ch; }
.doc ul, .doc ol { max-width: 74ch; padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc strong { font-weight: 620; }
/* Where a formula's implementation lives. */
.impl {
font-family: var(--mono);
font-size: 12.5px;
color: var(--ink-2);
background: var(--surface-2);
border: 1px solid var(--hairline);
border-radius: 6px;
padding: 3px 8px;
display: inline-block;
margin: 4px 0 2px;
}
code {
font-family: var(--mono);
font-size: 0.9em;
background: var(--surface-2);
border-radius: 4px;
padding: 1px 5px;
}
/* Display formulae. Set in the page's own type, with italic variables. */
.eq {
margin: 14px 0;
padding: 13px 18px;
background: var(--surface);
border: 1px solid var(--hairline);
border-left: 3px solid var(--globe);
border-radius: 8px;
font-size: 16px;
line-height: 1.9;
overflow-x: auto;
white-space: nowrap;
}
.eq i, .doc p i, .doc li i, td i { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.eq .where { display: block; font-size: 12.5px; color: var(--muted); white-space: normal; margin-top: 6px; }
.eq.stack { white-space: normal; }
.eq .line { display: block; }
table {
border-collapse: collapse;
width: 100%;
margin: 16px 0;
font-size: 13.5px;
}
th, td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--grid); vertical-align: top; }
thead th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
.callout {
margin: 18px 0;
padding: 12px 16px;
background: var(--surface-2);
border: 1px solid var(--hairline);
border-radius: 8px;
font-size: 13.5px;
}
.callout p { margin: 6px 0; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.toc { background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: 14px 18px; margin: 26px 0 0; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 13.5px; }
@media (max-width: 620px) { .toc ol { columns: 1; } }
.doc-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 12.5px; }
</style>
</head>
<body>
<article class="doc">
<div class="backbar" id="backbar">
<a class="backbtn" href="index.html" data-back>← Back to the visualiser</a>
</div>
<header class="doc-head">
<h1>The maths behind the Sunset Visualiser</h1>
<p class="lede">Every formula the page uses, the function that implements it, and the numbers it produces. Each figure quoted here comes from running that code, not from a textbook or an estimate.</p>
<nav>
<a href="tests.html">Verification tests</a>
<a href="privacy.html">Privacy</a>
<a href="https://github.com/james-debono/sunset-visualiser" target="_blank" rel="noopener">Source & feedback on GitHub <span aria-hidden="true">↗</span></a>
<a href="https://www.youtube.com/@jamesdebono" target="_blank" rel="noopener">James DeBono on YouTube <span aria-hidden="true">↗</span></a>
</nav>
</header>
<div class="toc">
<ol>
<li><a href="#conventions">Conventions</a></li>
<li><a href="#angular-diameter">The Sun’s angular diameter</a></li>
<li><a href="#ephemeris">Where the Sun is</a></li>
<li><a href="#ground">Where the Sun appears from the ground</a></li>
<li><a href="#globe">Globe model: why the Sun doesn’t shrink</a></li>
<li><a href="#flat">Flat model: why it would</a></li>
<li><a href="#refraction">Refraction</a></li>
<li><a href="#camera">The camera</a></li>
<li><a href="#decorative">What is decorative</a></li>
<li><a href="#simplifications">Known simplifications</a></li>
<li><a href="#results">Headline results</a></li>
<li><a href="#sources">Sources</a></li>
</ol>
</div>
<p>All the physics lives in <code>js/physics/</code> as small pure functions with no dependencies. Nothing in <code>js/render/</code> or <code>js/main.js</code> computes a physical quantity; those files only draw numbers they are handed. The <a href="tests.html">verification suite</a> checks the physics against published values, closed-form identities, and independent derivations of the same quantity that would disagree if either were wrong.</p>
<!-- 1 ------------------------------------------------------------------ -->
<h2 id="conventions"><span class="n">1</span>Conventions</h2>
<table>
<thead><tr><th>Quantity</th><th>Value</th><th>Where</th></tr></thead>
<tbody>
<tr><td>Astronomical unit</td><td>149,597,870.700 km (exact)</td><td><code>constants.js</code> <code>AU_KM</code></td></tr>
<tr><td>Solar radius</td><td>695,700 km (IAU nominal)</td><td><code>constants.js</code> <code>R_SUN_KM</code></td></tr>
<tr><td>Earth radius</td><td>6,378.137 km (WGS-84 equatorial)</td><td><code>solar.js</code> <code>R_EARTH_KM</code></td></tr>
<tr><td>Mean solar day</td><td>86,400 s</td><td><code>constants.js</code> <code>SOLAR_DAY_S</code></td></tr>
</tbody>
</table>
<ul>
<li>Distances are in km, times in hours, and angles in degrees unless stated.</li>
<li><strong>Time is apparent solar time</strong>: the Sun is due south or north at 12:00. The hour angle is <i>H</i> = 15° × (<i>t</i> − 12).</li>
<li><strong>Earth is a sphere</strong> of radius equal to the equatorial radius. In the default scenario the subsolar point runs along the equator, where that radius is exact. Oblateness is covered in <a href="#simplifications">§10</a>.</li>
<li><strong>Default scenario</strong>: an observer on the equator (0°, 0°), eye height 1.7 m, on 23 September 2026, the day of the September equinox. The window runs from three hours before geometric sunset (15:00) to sunset (18:00), and the timeline carries on far enough for the disc to go: 5 minutes at the equator, longer nearer the poles where the Sun slides down at a shallower angle.</li>
<li><strong>Place and date are both adjustable</strong>, up to 80° of latitude. Combinations with no sunset at all are refused rather than half-drawn. Every figure below is for the default equatorial equinox case unless it says otherwise; latitude and date change the numbers but not the conclusion (§6.8).</li>
</ul>
<!-- 2 ------------------------------------------------------------------ -->
<h2 id="angular-diameter"><span class="n">2</span>The Sun’s angular diameter</h2>
<span class="impl">solar.js → angularDiameterDeg(distanceKm)</span>
<p>A sphere of radius <i>r</i> seen from distance <i>d</i> to its centre subtends</p>
<div class="eq"><i>θ</i> = 2 · arcsin( <i>r</i> / <i>d</i> )</div>
<p>Note that this is arcsin, not arctan. The sight lines graze the limb, so they are tangent to the sphere and do not pass through its centre plane. The test suite pins this down with a sphere at <i>d</i> = 2<i>r</i>, which must subtend exactly 60°.</p>
<p>At 1 AU: <i>θ</i> = 0.53291° = 31.97′.</p>
<!-- 3 ------------------------------------------------------------------ -->
<h2 id="ephemeris"><span class="n">3</span>Where the Sun is</h2>
<span class="impl">solar.js → solarPosition(date)</span>
<p>This uses the U.S. Naval Observatory / <em>Astronomical Almanac</em> low-precision formulae, accurate to about 0.01° in ecliptic longitude between 1950 and 2050. With <i>n</i> = days since J2000.0 (2000 January 1, 12:00 TT):</p>
<div class="eq stack">
<span class="line"><i>L</i> = 280.460° + 0.9856474° <i>n</i> <span class="where">mean longitude</span></span>
<span class="line"><i>g</i> = 357.528° + 0.9856003° <i>n</i> <span class="where">mean anomaly</span></span>
<span class="line"><i>λ</i> = <i>L</i> + 1.915° sin <i>g</i> + 0.020° sin 2<i>g</i> <span class="where">ecliptic longitude</span></span>
<span class="line"><i>ε</i> = 23.439° − 0.0000004° <i>n</i> <span class="where">obliquity of the ecliptic</span></span>
<span class="line"><i>δ</i> = arcsin( sin <i>ε</i> · sin <i>λ</i> ) <span class="where">declination</span></span>
<span class="line"><i>D</i> = 1.00014 − 0.01671 cos <i>g</i> − 0.00014 cos 2<i>g</i> AU <span class="where">Earth–Sun distance</span></span>
</div>
<table>
<thead><tr><th>Check</th><th>This code</th><th>Published</th></tr></thead>
<tbody>
<tr><td>Declination at J2000.0</td><td>−23.03°</td><td>−23.03°</td></tr>
<tr><td>Earth–Sun distance at J2000.0</td><td>0.98331 AU</td><td>0.98330 AU</td></tr>
<tr><td>September 2026 equinox (<i>δ</i> = 0)</td><td>00:17 UTC, 23 Sep</td><td>00:05 UTC, 23 Sep</td></tr>
<tr><td>Perihelion / aphelion 2026</td><td>0.9833 / 1.0167 AU</td><td>0.9833 / 1.0167 AU</td></tr>
</tbody>
</table>
<p>The equinox lands 12 minutes off, which is within the formula’s stated accuracy.</p>
<!-- 4 ------------------------------------------------------------------ -->
<h2 id="ground"><span class="n">4</span>Where the Sun appears from the ground</h2>
<h3>4.1 Altitude</h3>
<span class="impl">solar.js → altitudeGeocentricDeg(lat, dec, H)</span>
<div class="eq">sin <i>a</i> = sin <i>φ</i> · sin <i>δ</i> + cos <i>φ</i> · cos <i>δ</i> · cos <i>H</i></div>
<p>For an observer on the equator (<i>φ</i> = 0) at an equinox (<i>δ</i> = 0), this reduces to <i>a</i> = 90° − <i>H</i>. The Sun is at <strong>exactly 45° at 15:00</strong> and <strong>0° at 18:00</strong>, descending at exactly 15° per hour. That is why the default scenario uses this case: the arithmetic is checkable by hand.</p>
<p><code>altitudeTopocentricDeg</code> then subtracts diurnal parallax, at most 8.79″ for the Sun. That is negligible, but it is included.</p>
<h3>4.2 The central angle</h3>
<span class="impl">solar.js → centralAngleDeg, groundDistanceToSubsolarKm</span>
<p>The <strong>subsolar point</strong> is where the Sun is directly overhead. The angle at Earth’s centre between the observer and that point is</p>
<div class="eq"><i>ψ</i> = 90° − <i>a</i></div>
<p>The great-circle ground distance to it is <i>Rψ</i> (with <i>ψ</i> in radians). At 15:00 in the default scenario that is <strong>5,009.4 km</strong>. This is a measurable distance on the real Earth, and it matters in <a href="#flat">§6</a>.</p>
<h3>4.3 Sunset</h3>
<span class="impl">solar.js → hourAngleAtAltitude(lat, dec, h0)</span>
<div class="eq">cos <i>H</i><sub>0</sub> = ( sin <i>h</i><sub>0</sub> − sin <i>φ</i> · sin <i>δ</i> ) / ( cos <i>φ</i> · cos <i>δ</i> )</div>
<p>With <i>h</i><sub>0</sub> = 0 (geometric sunset, the Sun’s centre on the horizon) this gives <i>H</i><sub>0</sub> = 90°, so sunset is at 18:00. The function returns <code>null</code> when |cos <i>H</i><sub>0</sub>| > 1, which is polar day or night; the app then refuses to build a scenario rather than inventing one.</p>
<h3>4.4 The sea horizon</h3>
<span class="impl">solar.js → horizonDipDeg, horizonDistanceKm</span>
<p>For an eye at height <i>h</i> above a spherical sea:</p>
<div class="eq">dip = arccos( <i>R</i> / (<i>R</i> + <i>h</i>) ) distance = √( <i>h</i> (2<i>R</i> + <i>h</i>) )</div>
<p>At 1.7 m the dip is <strong>2.51′</strong> and the horizon is <strong>4.66 km</strong> away.</p>
<!-- 5 ------------------------------------------------------------------ -->
<h2 id="globe"><span class="n">5</span>Globe model: why the Sun doesn’t shrink</h2>
<h3>5.1 Observer–Sun distance</h3>
<span class="impl">globe.js → observerSunDistanceKm(D, a)</span>
<p>The observer stands at distance <i>R</i> from Earth’s centre and the Sun is at distance <i>D</i>. The angle between those directions, at Earth’s centre, is <i>ψ</i>. By the law of cosines:</p>
<div class="eq"><i>d</i>² = <i>D</i>² + <i>R</i>² − 2<i>DR</i> · cos <i>ψ</i> = <i>D</i>² + <i>R</i>² − 2<i>DR</i> · sin <i>a</i></div>
<p>since cos <i>ψ</i> = sin <i>a</i>. The test suite checks two exact cases: with the Sun overhead, <i>d</i> = <i>D</i> − <i>R</i>; with the Sun on the horizon, <i>d</i> = √(<i>D</i>² + <i>R</i>²).</p>
<h3>5.2 Two effects change the distance, and both are included</h3>
<table>
<thead><tr><th>Effect</th><th class="num">15:00 → 18:00</th></tr></thead>
<tbody>
<tr><td><strong>Rotation.</strong> The observer is carried from 45° to 0° altitude, moving them about <i>R</i> cos 45° further from the Sun.</td><td class="num"><strong>+4,510 km</strong></td></tr>
<tr><td><strong>Orbit.</strong> In September Earth is heading towards perihelion, so the Earth–Sun distance <i>D</i> itself shrinks.</td><td class="num"><strong>−5,244 km</strong></td></tr>
<tr><td><strong>Net</strong></td><td class="num"><strong>−734 km</strong></td></tr>
</tbody>
</table>
<p>The observer–Sun distances the code produces are <strong>150,107,466 km</strong> at 15:00 and <strong>150,106,732 km</strong> at 18:00. The net change is 734 km out of 150 million, or <strong>0.0005%</strong>.</p>
<div class="callout">
<p>The distance goes <em>down</em>, so on this date the Sun is very slightly <em>larger</em> at sunset than three hours earlier. Most treatments quote only the rotational term, which would overstate the change, so the code computes both.</p>
</div>
<h3>5.3 The resulting angular size</h3>
<table>
<thead><tr><th></th><th class="num">Angular diameter</th></tr></thead>
<tbody>
<tr><td>15:00</td><td class="num">0.531097°</td></tr>
<tr><td>18:00</td><td class="num">0.531100°</td></tr>
<tr><td>Change</td><td class="num"><strong>+0.0094″</strong> (+0.0005%)</td></tr>
</tbody>
</table>
<p>The unaided eye resolves about 60″, which is more than 6,000 times this change.</p>
<h3>5.4 Rate of change</h3>
<span class="impl">globe.js → angularRateBreakdown(t), angularRateDegPerHour(t)</span>
<p>Differentiating <i>θ</i> = 2 arcsin(<i>r</i>/<i>d</i>):</p>
<div class="eq">d<i>θ</i>/d<i>t</i> = −2 (<i>r</i>/<i>d</i>²) / √(1 − (<i>r</i>/<i>d</i>)²) · d<i>d</i>/d<i>t</i></div>
<p>Differentiating <i>d</i>² = <i>D</i>² + <i>R</i>² − 2<i>DR</i> sin <i>a</i> splits the distance rate into exactly the two effects above:</p>
<div class="eq"><i>d</i> · d<i>d</i>/d<i>t</i> = (<i>D</i> − <i>R</i> sin <i>a</i>) d<i>D</i>/d<i>t</i> − <i>RD</i> cos <i>a</i> · d<i>a</i>/d<i>t</i>
<span class="where">first term orbital, second term rotational</span></div>
<p>d<i>D</i>/d<i>t</i> and d<i>δ</i>/d<i>t</i> come from differentiating the ephemeris series in §3, and d<i>a</i>/d<i>t</i> from differentiating §4.1 with d<i>H</i>/d<i>t</i> = 15° per hour. The ephemeris series run in hours of UTC while the app’s clock is apparent solar time; the two drift apart by about 2 parts in 10,000 through the equation of time, and the analytic form corrects for it. That correction matters here only because the two terms nearly cancel.</p>
<table>
<thead><tr><th>At</th><th class="num">Rotational</th><th class="num">Orbital</th><th class="num">Total</th></tr></thead>
<tbody>
<tr><td>15:00</td><td class="num">−0.01504″/h</td><td class="num">+0.02226″/h</td><td class="num"><strong>+0.00722″/h</strong></td></tr>
<tr><td>18:00</td><td class="num">−0.02127″/h</td><td class="num">+0.02227″/h</td><td class="num"><strong>+0.00100″/h</strong></td></tr>
</tbody>
</table>
<div class="callout">
<p><strong>How this is verified.</strong> The numerical rate (a central difference on the sampled curve) and the analytic rate above are written independently and share no algebra. The suite requires them to agree to 1 part in 100,000 of the terms’ magnitude, at five points across the window.</p>
</div>
<!-- 6 ------------------------------------------------------------------ -->
<h2 id="flat"><span class="n">6</span>Flat model: why it would</h2>
<span class="impl">flat.js → makeFlatModel</span>
<h3>6.1 The model</h3>
<p>The ground is a plane. The Sun is a small sphere at constant height <i>h</i> above it, travelling horizontally away from the observer in a straight line. This is the most charitable version of the flat model, and its speed is the <strong>measured speed of the subsolar point</strong> over the real ground:</p>
<div class="eq"><i>v</i> = 2π<i>R</i> cos <i>δ</i> / 24 h = <strong>1,669.8 km/h</strong> at the equator</div>
<p>At the equator this agrees exactly with the arc length in §4.2: 5,009.4 km = <i>v</i> × 3 h. The suite checks the two routes agree to one part in 10<sup>12</sup>.</p>
<h3>6.2 Where the flat Sun starts</h3>
<p>A flat model has to put the Sun somewhere at 15:00, and there are two defensible ways to do it. The app offers both.</p>
<p><strong>Match the real elevation</strong> (the default). Start the Sun at the elevation the real Sun actually has:</p>
<div class="eq"><i>x</i><sub>0</sub> = <i>h</i> / tan <i>a</i><sub>0</sub></div>
<p>Both camera views then begin identical, so every later difference comes from the model alone. The cost is an inconsistency, which the app reports on screen rather than hiding: at <i>h</i> = 1,000 mi the Sun must start <strong>1,609 km</strong> away horizontally, but the real subsolar point is <strong>5,009 km</strong> away.</p>
<p><strong>Above the real subsolar point.</strong> Set <i>x</i>(<i>t</i>) = <i>Rψ</i>(<i>t</i>), the measured ground distance. This has no free parameters, but the Sun then starts at the wrong elevation: 17.81° at 1,000 mi instead of 45°.</p>
<p>The two agree at exactly one height, <i>h</i> ≈ 5,009 km, which is offered as a preset.</p>
<h3>6.3 The Sun’s size is derived, not assumed</h3>
<p>The flat Sun’s physical radius is set so that it has the <strong>real</strong> angular diameter at the start of the window:</p>
<div class="eq"><i>d</i><sub>0</sub> = √(<i>x</i><sub>0</sub>² + <i>h</i>²) <i>r</i> = <i>d</i><sub>0</sub> · sin( <i>θ</i><sub>0</sub> / 2 )</div>
<p>At 1,000 mi that gives a Sun <strong>21.10 km</strong> across. The model is handed the correct starting appearance for free and only has to get the next three hours right.</p>
<h3>6.4 What happens next</h3>
<div class="eq stack">
<span class="line"><i>x</i>(<i>t</i>) = <i>x</i><sub>0</sub> + <i>v</i> (<i>t</i> − <i>t</i><sub>0</sub>)</span>
<span class="line"><i>d</i>(<i>t</i>) = √(<i>x</i>² + <i>h</i>²)</span>
<span class="line"><i>θ</i>(<i>t</i>) = 2 arcsin( <i>r</i> / <i>d</i> )</span>
<span class="line"><i>a</i>(<i>t</i>) = arctan( <i>h</i> / <i>x</i> )</span>
</div>
<table>
<thead><tr><th></th><th class="num">15:00</th><th class="num">18:00 (real sunset)</th></tr></thead>
<tbody>
<tr><td>Horizontal distance</td><td class="num">1,609 km</td><td class="num">6,619 km</td></tr>
<tr><td>Line of sight</td><td class="num">2,276 km</td><td class="num">6,812 km</td></tr>
<tr><td>Angular diameter</td><td class="num">0.5311°</td><td class="num"><strong>0.1775°</strong> (33.4% of start)</td></tr>
<tr><td>Elevation</td><td class="num">45.00°</td><td class="num"><strong>13.67°</strong></td></tr>
</tbody>
</table>
<p>The Sun shrinks by <strong>21.22′</strong>, which is <strong>136,140×</strong> the globe model’s change. And since <i>a</i> = arctan(<i>h</i>/<i>x</i>) is positive for any finite <i>x</i>, <strong>the flat Sun can never set</strong>. It only approaches the horizon asymptotically.</p>
<h3>6.5 Rate of change</h3>
<p>With the elevation anchor <i>x</i> is linear in <i>t</i>, so d<i>d</i>/d<i>t</i> = <i>xv</i>/<i>d</i> and</p>
<div class="eq">d<i>θ</i>/d<i>t</i> = −2 (<i>r</i>/<i>d</i>²) / √(1 − (<i>r</i>/<i>d</i>)²) · <i>xv</i>/<i>d</i></div>
<p><strong>Where the shrink is fastest.</strong> Since <i>θ</i> ≈ 2<i>r</i>/<i>d</i>, the rate goes as <i>x</i>/(<i>x</i>²+<i>h</i>²)<sup>3/2</sup>, which peaks at <i>x</i> = <i>h</i>/√2, where the elevation is arctan√2 = 54.7°. The window starts at 45°, already past that peak, so the flat Sun shrinks fastest at the start and slows down: <strong>−16.53″ per minute</strong> at 15:00, <strong>−2.54″ per minute</strong> at 18:00. That is the shape of the curve in the rate chart.</p>
<div class="callout">
<p><strong>How this is verified.</strong> The suite compares this closed form with a central difference, then halves the differentiation step four times and requires the gap to fall by 4× each time. That is second-order convergence, which shows the remaining gap is truncation error in the numerical derivative and not an algebra error in either form.</p>
</div>
<h3>6.6 How high would the flat Sun need to be?</h3>
<span class="impl">flat.js → minimumHeightForImperceptibleShrink</span>
<p>Bisection on <i>h</i> for the lowest height at which the shrink across the window stays under 1′, the naked-eye limit:</p>
<table>
<thead><tr><th>Start position</th><th class="num">Minimum height</th><th class="num">Elevation at real sunset</th></tr></thead>
<tbody>
<tr><td>Match the real elevation</td><td class="num"><strong>78,504 km</strong> (6.2 Earth diameters)</td><td class="num">43.2°</td></tr>
<tr><td>Above the real subsolar point</td><td class="num"><strong>33,439 km</strong></td><td class="num">73.3°</td></tr>
</tbody>
</table>
<p>At those heights the flat model hides the shrink only by failing to set at all.</p>
<h3>6.7 The other flat model: the Gleason map</h3>
<span class="impl">flat.js → makeFlatModel({ path: 'gleason' })</span>
<p>The local-plane version above is a steelman: it is handed the measured speed of the subsolar point and asked only to move in a straight line. The maps flat-Earth arguments actually use are azimuthal-equidistant discs — the Gleason map and its relatives — with the north pole at the centre and distance from the pole preserved:</p>
<div class="eq"><i>r</i>(<i>φ</i>) = <i>R</i> (π/2 − <i>φ</i>)<span class="where">so the north pole is 0, the equator 10,019 km out, and the south pole is smeared round the rim</span></div>
<p>Choose that map and nothing is left to fit. The Sun circles above the latitude of its own declination, and the observer sits on his own circle, so the distance between them is the cosine rule about the pole, with the hour angle as the included angle:</p>
<div class="eq"><i>x</i>(<i>t</i>) = √( <i>r</i><sub>obs</sub>² + <i>r</i><sub>sun</sub>² − 2 <i>r</i><sub>obs</sub> <i>r</i><sub>sun</sub> cos <i>H</i> )</div>
<p>Three consequences follow, none of them chosen:</p>
<table>
<thead><tr><th></th><th class="num">This map says</th><th class="num">Measured</th></tr></thead>
<tbody>
<tr><td>Length of the equator</td><td class="num">62,950 km</td><td class="num">40,075 km</td></tr>
<tr><td>Sun's speed over the ground</td><td class="num">2,628 km/h</td><td class="num">1,670 km/h</td></tr>
<tr><td>Bearing of the Sun at sunset, equator, equinox</td><td class="num">315° (north-west)</td><td class="num">270° (due west)</td></tr>
</tbody>
</table>
<p>The equator comes out longer by exactly π/2, which is 57%, and everything else follows from that. It is not a subtle discrepancy: it is checkable by flying between two points on the equator and timing it, or by watching where the Sun actually sets with a compass. A 45° error in bearing is the width of half the sky.</p>
<div class="callout">
<p><strong>An honest surprise: on angular size this map does better than the steelman, not worse.</strong> The obvious guess is that a Sun moving half as fast again must shrink faster. It does not, because the map also starts it <strong>7,676 km</strong> away rather than 1,609 km, and the extra starting distance more than cancels the extra speed. Its Sun ends at <strong>54.9%</strong> of its width, against 33.4% for the elevation-matched local plane.</p>
<p>That is still a 45% loss of width where the real Sun changes by 0.0094″, and it is still about 92,000 times the globe model's change. The map buys a slightly better answer on this one question by being flatly wrong about where the Sun is in the sky.</p>
</div>
<p>The plan-view inset in the flat side panel shows the map itself: the pole, the observer's circle, the Sun's circle, and the line between them, because the elevation view alone cannot show a Sun that swings round rather than receding in a straight line.</p>
<p><strong>Which way round it goes.</strong> The Sun's longitude east of the observer is −<i>H</i>: it is overhead at solar noon and falls away westward all afternoon. Viewed from above the north pole, eastward runs counter-clockwise, so westward travel is <strong>clockwise</strong>, and that is how the inset draws it, with an arrow on the leading edge. The sign matters more than it looks: get it wrong and the picture is a view of the disc from underneath, which would disagree with the bearing the model reports for the same instant. The test suite pins the longitude falling through the whole window and the Sun staying in the western half of the sky.</p>
<h3>6.8 What latitude changes</h3>
<p>The equator is where the flat model fares worst: the Sun starts highest, and so nearest, and then recedes furthest in relative terms. Moving away from it softens the contrast without coming close to rescuing the model.</p>
<table>
<thead><tr><th>Observer</th><th class="num">Sun at 15:00</th><th class="num">Globe change</th><th class="num">Flat Sun ends at</th><th class="num">Ratio</th></tr></thead>
<tbody>
<tr><td>Equator</td><td class="num">45.0°</td><td class="num">+0.0094″</td><td class="num">33.4% of its width</td><td class="num">136,150×</td></tr>
<tr><td>Melbourne, 37.8°S</td><td class="num">34.0°</td><td class="num">+0.0214″</td><td class="num">38.0%</td><td class="num">55,374×</td></tr>
<tr><td>London, 51.5°N</td><td class="num">26.0°</td><td class="num">+0.0311″</td><td class="num">43.4%</td><td class="num">34,876×</td></tr>
<tr><td>80°N</td><td class="num">6.9°</td><td class="num">+0.0568″</td><td class="num">72.7%</td><td class="num">9,169×</td></tr>
</tbody>
</table>
<p>Even at 80°, where the Sun only creeps down a shallow slope, the flat model still loses more than a quarter of the Sun’s width while the real one changes by six hundredths of an arcsecond. The globe figures grow with latitude because the Sun spends the window nearer the horizon, where the observer’s rotation carries them away from it most directly. They stay thousands of times too small to see.</p>
<!-- 7 ------------------------------------------------------------------ -->
<h2 id="refraction"><span class="n">7</span>Refraction</h2>
<span class="impl">refraction.js</span>
<p><strong>Standard air by default</strong>, and applied equally to both models. Real sunsets happen in an atmosphere, and the comparison does not depend on refraction either way, because it acts on the vertical axis only (§7.2). “Off (pure geometry)” is one of the presets if you want the bare geometry.</p>
<p><strong>Sæmundsson (1986)</strong>, from true altitude <i>h</i> — the direction the app uses, since geometry is computed first:</p>
<div class="eq"><i>R</i> = 1.02′ / tan( <i>h</i> + 10.3 / (<i>h</i> + 5.11) )</div>
<p><strong>Bennett (1982)</strong>, from apparent altitude <i>h</i><sub>a</sub>, used to cross-check that the two are mutual inverses:</p>
<div class="eq"><i>R</i> = 1′ / tan( <i>h</i><sub>a</sub> + 7.31 / (<i>h</i><sub>a</sub> + 4.4) )</div>
<h3>7.1 How much refraction: the settings</h3>
<p>Both formulae are written for 1010 hPa and 10 °C, and scale for other conditions as</p>
<div class="eq">factor = (<i>P</i> / 1010) · (283 / (273 + <i>T</i>)) · <i>scale</i></div>
<p>Denser air bends light more, so refraction rises with pressure and falls with temperature. Each preset’s label is generated at runtime from the functions themselves, so a label can never advertise a figure the code does not produce.</p>
<table>
<thead><tr><th>Preset</th><th>Conditions</th><th class="num">Refraction at the horizon</th></tr></thead>
<tbody>
<tr><td>Off</td><td>pure geometry</td><td class="num">0</td></tr>
<tr><td>Standard air <em>(default)</em></td><td>1010 hPa, 10 °C</td><td class="num">29.0′</td></tr>
<tr><td>Hot day</td><td>1005 hPa, 40 °C</td><td class="num">26.1′</td></tr>
<tr><td>Cold day</td><td>1020 hPa, −20 °C</td><td class="num">32.7′</td></tr>
<tr><td>Cold, high pressure</td><td>1040 hPa, −30 °C</td><td class="num">34.8′</td></tr>
</tbody>
</table>
<p>That is the whole range, and it is narrow: across all ordinary weather the scaling spans only about <strong>±10%</strong>.</p>
<div class="callout">
<p><strong>Why there is no “mirage” preset.</strong> Real horizon refraction varies far more than weather scaling suggests, because it is governed by the temperature <em>profile</em> of the lowest few hundred metres of air. A strong inversion over cold water can multiply it several times over, produce mirages, stack and invert images, and in the Novaya Zemlya effect lift a Sun that set days ago.</p>
<p>Neither formula here models any of that. Doing it properly means ray tracing through a temperature profile, including ducting and the multiple images it produces — a different piece of work. Rather than offer a multiplier dressed up as a setting, this page offers only conditions the formulae are actually valid for, and answers the mirage question with the argument in §7.2 instead, which does not depend on modelling it.</p>
</div>
<h3>7.2 What refraction does, and what it cannot do</h3>
<span class="impl">refraction.js → apparentDiscDeg</span>
<p>It lifts the Sun, so at geometric sunset the Sun appears about half a degree <em>above</em> the horizon and real sunset comes a few minutes later. And because it lifts the lower limb more than the upper limb, it squashes the disc vertically: to 85.5% of its width in standard air, and to 42% under the ×4 preset.</p>
<div class="callout">
<p><strong>The key property, and it is a theorem rather than a result of these formulae.</strong> Refraction is a function of altitude alone. Two points at the same altitude are therefore displaced identically, so the <em>horizontal</em> diameter of the disc cannot change — at any strength, under any profile, including ones nobody can compute. All refraction can do is move the limbs vertically relative to each other, squashing the disc, or in the extreme turning the image over.</p>
<p>That is what settles the mirage question without modelling a mirage. The flat model needs the Sun to lose <strong>67% of its width</strong>. Refraction cannot take away any of it.</p>
<p>The suite checks the width is untouched to the last bit for every preset at eleven altitudes from 45° down to 4° below the horizon, and separately at 2, 4 and 8 times standard refraction — strengths no preset offers — to show the property does not depend on the setting. At 8 times, the lower limb overtakes the upper one and the image inverts, which the code reports as a flag rather than as a negative height.</p>
</div>
<p><strong>Horizon dip.</strong> With refraction on, the sea-horizon dip uses the navigational value 1.76′√<i>h</i>[m], which is 2.29′ at 1.7 m against a geometric 2.51′ (Bowditch). On the flat model the horizon is the vanishing line of the plane, at exactly 0°.</p>
<h3>7.3 Where the formulae stop working</h3>
<p>Both formulae contain an inner term of the form <i>h</i> + <i>k</i>/(<i>h</i> + <i>c</i>), which has a minimum at <i>h</i> = √<i>k</i> − <i>c</i>. Below that altitude the term turns and refraction starts <em>falling</em> with depth, which is not what real air does. Applied to a disc it is worse than wrong: the upper limb would get more refraction than the lower, stretching the Sun vertically instead of squashing it.</p>
<table>
<thead><tr><th>Formula</th><th class="num">Valid down to</th><th class="num">Maximum modelled refraction</th></tr></thead>
<tbody>
<tr><td>Sæmundsson (true altitude)</td><td class="num">−1.901°</td><td class="num">44.65′ in standard air</td></tr>
<tr><td>Bennett (apparent altitude)</td><td class="num">−1.696°</td><td class="num">—</td></tr>
</tbody>
</table>
<p><strong>Nothing you can see depends on the clamp.</strong> Under every preset the Sun’s upper limb is already below the horizon before its altitude reaches the limit — between 0.76° and 0.98° below it, depending on the preset, which the test suite checks. Past that the Sun is hidden by the sea, and the readouts say “not modelled this low” instead of quoting a number.</p>
<p>Below those altitudes the code <strong>holds refraction at its maximum modelled value</strong> rather than following the formula down. The test suite walks both formulae from 60° down to −6° and requires that refraction never decreases, and checks the disc is never widened at any altitude down to 4° below the horizon under every preset.</p>
<div class="callout">
<p><strong>What the clamp is.</strong> A guard against nonsense, not a description of the air. Down there real refraction keeps growing and keeps squashing the disc — that is what produces the flattened, stacked and omega-shaped Suns in mirage photographs — so a held value is wrong. It is wrong in the safe direction, understating refraction rather than inventing a stretched Sun, and it governs nothing that is on screen.</p>
</div>
<p>This matters in practice because the timeline runs to 4° below the horizon, so that the disc can be seen to set even under the ×4 preset, which lifts it by nearly 3°.</p>
<!-- 8 ------------------------------------------------------------------ -->
<h2 id="camera"><span class="n">8</span>The camera</h2>
<span class="impl">optics.js</span>
<h3>8.1 Lens</h3>
<p>A pinhole (rectilinear) lens on a full-frame 36 × 24 mm sensor. Focal length refers to the <strong>24 mm height</strong>, because vertical framing is what this scene is about; the horizontal field extends to fill the pane.</p>
<div class="eq">vertical field of view = 2 · arctan( 12 mm / <i>f</i> )</div>
<p>At 24 mm that is 53.13°.</p>
<h3>8.2 Projection</h3>
<span class="impl">optics.js → project, projectVector, discOutline</span>
<p>A direction <i>d̂</i> in local east–north–up coordinates, seen by a camera with basis (forward <i>f̂</i>, right <i>r̂</i>, up <i>û</i>), lands at</p>
<div class="eq"><i>x</i> = <i>f</i><sub>px</sub> (<i>d̂</i> · <i>r̂</i>) / (<i>d̂</i> · <i>f̂</i>) <i>y</i> = <i>f</i><sub>px</sub> (<i>d̂</i> · <i>û</i>) / (<i>d̂</i> · <i>f̂</i>) <i>f</i><sub>px</sub> = <i>H</i><sub>px</sub> · <i>f</i> / 24 mm</div>
<p>The Sun’s outline is built on the sphere and then projected, so the lens distorts it exactly as a real lens would rather than being drawn as a circle and hoped for.</p>
<h3>8.3 Framing</h3>
<span class="impl">optics.js → pitchForHorizonFractionDeg, defaultFraming</span>
<p>To put the horizon a fraction <i>k</i> of the frame height above the bottom edge:</p>
<div class="eq">tan(pitch) = (1 − 2<i>k</i>) · tan( vfov / 2 )</div>
<p>The default lens is the longest common focal length that fits everything from the horizon to the top of the Sun at 15:00 (45° + <i>θ</i>/2 = 45.27°) with 2% margins:</p>
<div class="eq"><i>f</i> ≤ 12 mm (1 − 2 × 0.02) / tan(45.27° / 2) = 27.63 mm</div>
<p>The longest common lens that fits is therefore <strong>24 mm</strong>. The horizon then sits 8.31% of the frame height above the bottom, and that fraction is held fixed as the lens is changed.</p>
<p><strong>Away from the equator</strong> the Sun sets at a slant, so it tracks sideways as it goes: about 32° of bearing across the window at Melbourne, 38° at London. The frame has to hold that too, so the lens is the shorter of the two limits, measured against a 3:2 frame (real panes are wider, so this is the conservative test), and the camera faces the Sun’s mean bearing rather than its bearing at sunset.</p>
<p>That leaves vertical slack, because a low Sun needs little height. Centring the content would then float the horizon up the middle of the frame and fill the bottom half with sea, so the horizon is capped at 12% of the frame height and the slack goes to the sky instead. The suite checks that the Sun and the horizon are both still inside the frame across the range of latitudes the picker allows.</p>
<h3>8.4 Why the loupe is a separate camera</h3>
<p>A rectilinear lens stretches objects off-axis. At 24 mm the Sun at 45° is 22.6° off-axis, where a disc is drawn <strong>16.9% taller</strong> than on-axis.</p>
<p>That is correct lens behaviour, and the main view reproduces it. But magnifying that frame would make the Sun appear to change size as it crossed it — exactly the effect under test. So the loupe is a second camera <strong>aimed straight at the Sun</strong>, where the disc is undistorted. The suite verifies that a disc viewed head-on spans exactly 2<i>f</i> tan <i>r</i> in both axes, at any altitude.</p>
<p>It defaults to 1600 mm, a 0.86° field, in which the Sun fills about 62% of the height. Where the pane is wide enough, the loupe is a full-height panel beside the frame rather than an inset on top of it.</p>
<h3>8.5 Glow brightness</h3>
<p>Two things change how much light arrives. One is the Sun’s angular area, since surface brightness does not change with distance, so flux follows the solid angle. The other is the air.</p>
<h3>8.6 Extinction, and why people think the Sun shrinks</h3>
<span class="impl">extinction.js</span>
<p>Light from a low Sun crosses far more atmosphere than light from a high one. The standard fit for how much more is Kasten & Young (1989):</p>
<div class="eq"><i>X</i> = 1 / ( sin <i>h</i> + 0.50572 (<i>h</i> + 6.07995)<sup>−1.6364</sup> )<span class="where">airmass: 1.00 overhead, 1.41 at 45°, 37.92 at the horizon</span></div>
<p>and the loss is the usual magnitude law, transmittance = 10<sup>−0.4<i>kX</i></sup>. With <i>k</i> = 0.15 magnitudes per airmass the total dimming from overhead to the horizon comes to about 5.5 magnitudes, a factor of roughly 165 — consistent with the drop from ~100,000 lux at midday to ~500 lux at a clear sunset. A single coefficient is an approximation: real extinction is Rayleigh scattering plus aerosol plus ozone, and the aerosol part varies by a factor of several with haze. It is the right trend and the right order of magnitude, not photometry.</p>
<p>Put the two together and the globe model predicts this:</p>
<table>
<thead><tr><th></th><th class="num">Angular diameter</th><th class="num">Light reaching you</th></tr></thead>
<tbody>
<tr><td>15:00</td><td class="num">0.5311°</td><td class="num">100%</td></tr>
<tr><td>Sunset</td><td class="num">0.5311°</td><td class="num">1.6%</td></tr>
</tbody>
</table>
<div class="callout">
<p><strong>This is the honest version of “the Sun looks smaller at sunset”.</strong> Something really does shrink, by a factor of sixty: the glare. At midday the Sun is so far past what an eye or a sensor can hold that it blooms into a patch many times the disc; by sunset it is faint enough to look at, and the bloom collapses onto the disc.</p>
<p>The disc inside it never moved. That is what the loupe on this page is for: the wide view shows the glare shrinking, and the magnified view beside it shows the disc against a dashed ring at its starting size, unchanged. If you have ever watched a sunset and felt the Sun get smaller, this is almost certainly what you were watching.</p>
</div>
<p><strong>Where the physics stops and the drawing starts.</strong> The flux is computed. Turning it into a radius is not. Veiling glare in an eye or a lens falls off roughly as the inverse square of angle — the Stiles–Holladay form — so the radius at which it drops below a fixed visibility threshold goes as the square root of the flux, and that is the rule the renderer uses. Opacity is held constant, because both eye and camera re-expose as the scene darkens; anything else would make the glare fade rather than contract, and an altitude term would make it appear to <em>grow</em> towards sunset as the sky went dark behind it. It is a plausible rule, not a scattering model, and both panes use the identical one.</p>
<p>The progression is not linear, and should not be: from 45° down to about 18° the glare barely changes, because the air in the way has barely changed. Almost all of the collapse happens in the last few degrees, which is exactly when people say the Sun looks like it is shrinking.</p>
<!-- 9 ------------------------------------------------------------------ -->
<h2 id="decorative"><span class="n">9</span>What is decorative</h2>
<p>These carry no part of the argument, and both models use the same functions for them:</p>
<ul>
<li><strong>Sky and sea colours.</strong> They vary with solar altitude to look like a sunset, but they are not a radiative-transfer model.</li>
<li><strong>Glare shape.</strong> The flux behind it is computed (§8.5, §8.6); how that flux becomes a radius and an opacity is a rendering rule.</li>
<li><strong>Globe side view distances.</strong> Earth and Sun sizes and spacing are schematic, labelled as such, with the true-scale sizes printed on the panel. The angles are exact.</li>
<li><strong>Flat side view Sun size.</strong> Drawn at a 4.5 px minimum when its true size would be sub-pixel, with the enlargement factor shown. Its position and line of sight are never adjusted.</li>
</ul>
<!-- 10 ----------------------------------------------------------------- -->
<h2 id="simplifications"><span class="n">10</span>Known simplifications</h2>
<table>
<thead><tr><th>Simplification</th><th>Size of effect</th><th>Why it cannot change the conclusion</th></tr></thead>
<tbody>
<tr><td>Spherical Earth; oblateness 0.34% ignored</td><td>Changes <i>R</i> by at most 21 km, so the 4,510 km rotational term by at most ~15 km</td><td>Moves the globe result by at most ~0.0003″</td></tr>
<tr><td>Low-precision ephemeris</td><td>~0.01° in solar longitude</td><td>The globe result depends on distance <em>changes</em> of thousands of km; the ephemeris is far better than that</td></tr>
<tr><td>Flat Sun moves in a straight line <em>(now optional)</em></td><td>The azimuthal-equidistant map is offered too, and circles the Sun at 2,628 km/h (§6.7)</td><td>Neither is the flat model’s best case on every count: the map shrinks the Sun less but puts it 45° wrong in bearing</td></tr>
<tr><td>Declination held fixed for the flat Sun’s speed</td><td><i>δ</i> changes ~0.05° across the window</td><td>Changes <i>v</i> by about 3 parts in a million near the equinox</td></tr>
<tr><td>Refraction formulae, and the <i>scale</i> knob</td><td>Unreliable below about −1°; inversions are not modelled, only approximated by a multiplier</td><td>Refraction cannot alter the disc’s width at any strength (§7.2)</td></tr>
<tr><td>Naked-eye resolution taken as 1′</td><td>A rule of thumb</td><td>The globe change is 6,000× smaller; the threshold could be wrong by 1,000× without mattering</td></tr>
</tbody>
</table>
<!-- 11 ----------------------------------------------------------------- -->
<h2 id="results"><span class="n">11</span>Headline results</h2>
<p>Default scenario: equator, 23 September 2026, 15:00 → 18:00 apparent solar time, flat Sun at 1,000 mi starting at the real elevation.</p>
<table>
<thead><tr><th></th><th class="num">Globe</th><th class="num">Flat</th></tr></thead>
<tbody>
<tr><td>Angular diameter at 15:00</td><td class="num">0.531097°</td><td class="num">0.531097° (calibrated)</td></tr>
<tr><td>Angular diameter at 18:00</td><td class="num">0.531100°</td><td class="num">0.1775°</td></tr>
<tr><td>Change</td><td class="num">+0.0094″</td><td class="num">−1,273″ (−21.22′)</td></tr>
<tr><td>Size at 18:00 vs 15:00</td><td class="num">100.0005%</td><td class="num">33.4%</td></tr>
<tr><td>Altitude at 18:00</td><td class="num">0.00°</td><td class="num">13.67°</td></tr>
<tr><td>Distance to Sun, change</td><td class="num">−734 km</td><td class="num">+4,536 km</td></tr>
<tr><td>Light received at 18:00 vs 15:00</td><td class="num">100.001%</td><td class="num">11.2%</td></tr>
</tbody>
</table>
<p>The flat model’s change is <strong>136,140×</strong> the globe model’s.</p>
<!-- 12 ----------------------------------------------------------------- -->
<h2 id="sources"><span class="n">12</span>Sources</h2>
<p>Every constant and formula in <code>js/physics/</code> traces to one of these.</p>
<h3>Constants</h3>
<table>
<thead><tr><th>Value</th><th>Source</th></tr></thead>
<tbody>
<tr><td>Astronomical unit, 149,597,870,700 m (exact)</td><td>IAU 2012 Resolution B2, <em>Re-definition of the astronomical unit of length</em></td></tr>
<tr><td>Nominal solar radius, 6.957 × 10<sup>8</sup> m</td><td>IAU 2015 Resolution B3, <em>Recommended nominal conversion constants for selected solar and planetary properties</em></td></tr>
<tr><td>Earth equatorial radius, 6,378,137 m</td><td>World Geodetic System 1984 (WGS-84), NIMA Technical Report TR8350.2</td></tr>
<tr><td>Earth mean radius, 6,371,008.8 m</td><td>Moritz, H. (2000), <em>Geodetic Reference System 1980</em>, Journal of Geodesy 74, 128–133</td></tr>
<tr><td>Mean sidereal day, 86,164.0905 s</td><td>IERS Conventions (2010), IERS Technical Note 36</td></tr>
<tr><td>International mile 1,609.344 m; foot 0.3048 m (exact)</td><td>International Yard and Pound Agreement (1959)</td></tr>
</tbody>
</table>
<h3>Solar position</h3>
<ul>
<li><strong>Low-precision formulae for the Sun’s coordinates.</strong> U.S. Naval Observatory, <em>The Astronomical Almanac</em>, Section C (“Sun”). Stated accuracy 0.01° over 1950–2050.</li>
<li>Meeus, J. (1998), <em>Astronomical Algorithms</em>, 2nd ed., Willmann-Bell — ch. 13 (coordinate transformations), ch. 15 (rising and setting), ch. 25 (solar coordinates).</li>
</ul>
<h3>Extinction</h3>
<ul>
<li>Kasten, F. & Young, A. T. (1989), <em>Revised optical air mass tables and approximation formula</em>, Applied Optics 28, 4735–4738.</li>
<li>Extinction coefficient and the midday-to-sunset illuminance drop: standard observational figures, used here only to fix the scale of the effect.</li>
</ul>
<h3>Refraction and horizon dip</h3>
<ul>
<li>Sæmundsson, Þ. (1986), <em>Astronomical refraction</em>, Sky & Telescope 72, 70.</li>
<li>Bennett, G. G. (1982), <em>The calculation of astronomical refraction in marine navigation</em>, Journal of Navigation 35, 255–259.</li>
<li>Bowditch, N., <em>The American Practical Navigator</em> (NGA Pub. 9), altitude corrections: dip of the sea horizon, 1.76′√<i>h</i> (<i>h</i> in metres).</li>
</ul>
<h3>Values used to check the code</h3>
<table>
<thead><tr><th>Check</th><th>Value</th><th>Source</th></tr></thead>
<tbody>
<tr><td>Solar declination and distance at J2000.0</td><td>−23.03°, 0.98330 AU</td><td><em>The Astronomical Almanac</em> for 2000</td></tr>
<tr><td>September 2026 equinox</td><td>2026-09-23 00:05 UTC</td><td>USNO <em>Earth’s Seasons</em>; also <a href="https://earthsky.org/astronomy-essentials/everything-you-need-to-know-september-equinox/">EarthSky</a> and <a href="https://starwalk.space/en/news/autumnal-equinox-first-day-of-fall">Star Walk</a></td></tr>
<tr><td>Perihelion and aphelion distances</td><td>0.9833 AU, 1.0167 AU</td><td><em>The Astronomical Almanac</em></td></tr>
<tr><td>Refraction at the horizon</td><td>about 34′</td><td>Bennett (1982); standard navigational tables</td></tr>
<tr><td>Equation of time, early November</td><td>about +16.4 min</td><td><em>The Astronomical Almanac</em></td></tr>
</tbody>
</table>
<h3>Rules of thumb, flagged as such where used</h3>
<ul>
<li><strong>Naked-eye angular resolution of about 1′.</strong> This is the definition of standard 6/6 (20/20) Snellen visual acuity: resolving detail that subtends one arcminute. It is used only to ask “could anyone see this change?”, and the conclusion holds with any threshold within a factor of 1,000.</li>
</ul>
<footer class="doc-foot">
<p>Sunset Visualiser · <a href="index.html">the visualiser</a> · <a href="tests.html">verification tests</a> · MIT licensed. If you find an error in any of this, it is a bug worth reporting.</p>
</footer>
</article>
<script>
// Going "back" is preferable to a fresh load: the visualiser keeps its whole
// state in the URL, and the history entry has it. Only do that when we
// actually arrived from there, so the button still works on a direct visit.
for (const a of document.querySelectorAll('[data-back]')) {
a.addEventListener('click', (e) => {
if (history.length < 2 || !document.referrer) return;
const from = new URL(document.referrer, location.href);
if (from.origin !== location.origin) return;
if (!/(^|\/)(index\.html)?$/.test(from.pathname)) return;
e.preventDefault();
history.back();
});
}
const bar = document.getElementById('backbar');
if (bar) {
const sentinel = document.createElement('div');
bar.parentNode.insertBefore(sentinel, bar);
new IntersectionObserver(
([e]) => bar.classList.toggle('stuck', e.intersectionRatio === 0),
{ threshold: [0, 1] },
).observe(sentinel);
}
</script>
</body>
</html>