Repository navigation
Expand file tree
/
Copy pathphysics.html
More file actions
2730 lines (2532 loc) · 138 KB
/
Copy pathphysics.html
File metadata and controls
2730 lines (2532 loc) · 138 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
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Physics of the Black Hole Simulation</title>
<link rel="icon" type="image/svg+xml" href="../assets/img/icons/atom.svg">
<style>
:root {
--bg: #0d1117;
--card: #161b22;
--border: #30363d;
--text: #c9d1d9;
--heading: #e6edf3;
--accent: #58a6ff;
--accent2: #f0883e;
--code-bg: #1c2128;
--eq-bg: #1c2128;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.7;
padding: 2rem 1rem;
}
.container { max-width: 900px; margin: 0 auto; }
h1 {
font-size: 2.2rem;
color: var(--heading);
border-bottom: 1px solid var(--border);
padding-bottom: 0.6rem;
margin-bottom: 1.5rem;
}
h2 {
font-size: 1.6rem;
color: var(--accent);
margin-top: 2.8rem;
margin-bottom: 0.8rem;
border-bottom: 1px solid var(--border);
padding-bottom: 0.3rem;
}
h3 {
font-size: 1.25rem;
color: var(--accent2);
margin-top: 1.8rem;
margin-bottom: 0.5rem;
}
h4 {
font-size: 1.05rem;
color: var(--heading);
margin-top: 1.3rem;
margin-bottom: 0.4rem;
}
p { margin-bottom: 0.9rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
background: var(--code-bg);
padding: 0.15em 0.4em;
border-radius: 4px;
font-size: 0.92em;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
pre {
background: var(--code-bg);
padding: 1rem;
border-radius: 6px;
overflow-x: auto;
margin-bottom: 1rem;
font-size: 0.88em;
line-height: 1.5;
}
pre code { background: none; padding: 0; }
.eq {
background: var(--eq-bg);
border-left: 3px solid var(--accent);
padding: 0.8rem 1.2rem;
margin: 1rem 0;
border-radius: 4px;
font-family: 'Georgia', serif;
font-size: 1.05em;
overflow-x: auto;
}
.note {
background: #1a2332;
border-left: 3px solid var(--accent2);
padding: 0.8rem 1.2rem;
margin: 1rem 0;
border-radius: 4px;
}
.comparison {
background: #1a2a1a;
border-left: 3px solid #3fb950;
padding: 0.8rem 1.2rem;
margin: 1rem 0;
border-radius: 4px;
}
.limitation {
background: #2a1a1a;
border-left: 3px solid #f85149;
padding: 0.8rem 1.2rem;
margin: 1rem 0;
border-radius: 4px;
}
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
th, td {
border: 1px solid var(--border);
padding: 0.5rem 0.8rem;
text-align: left;
}
th { background: var(--card); color: var(--heading); }
ul, ol { margin: 0.5rem 0 1rem 1.5rem; }
li { margin-bottom: 0.3rem; }
.ref { font-size: 0.85em; color: #8b949e; }
.ref a { color: #8b949e; }
.toc {
background: var(--card);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1.2rem 1.5rem;
margin-bottom: 2rem;
}
.toc h2 { margin-top: 0; border: none; font-size: 1.2rem; }
.toc ol { margin-top: 0.5rem; }
.toc li { margin-bottom: 0.2rem; }
.toc a { color: var(--text); }
.back-link {
display: inline-block;
margin-bottom: 1.5rem;
color: var(--accent);
}
sup { font-size: 0.75em; }
sup a { color: var(--accent2); }
.references { font-size: 0.9em; }
.references li { margin-bottom: 0.5rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
</style>
</head>
<body>
<div class="container">
<a href="../index.html" class="back-link">← Back to simulation</a>
<h1>Physics of the Black Hole Simulation</h1>
<p>
This document provides a comprehensive description of every physics model, equation, and
approximation used in this interactive black hole ray-tracing simulation.
Each section traces the origin of the equations to their foundational references
and discusses where the simulation is physically accurate and where it departs from reality.
</p>
<div class="note">
<strong>Scope note:</strong> Schwarzschild photon geodesics are modeled from the exact Binet equation.
Spinning-hole lensing, accretion-flow emission, jet emission, and the GRMHD-inspired controls
are progressively more approximate and are documented as such below.
</div>
<!-- ============================================================ -->
<!-- TABLE OF CONTENTS -->
<!-- ============================================================ -->
<nav class="toc">
<h2>Contents</h2>
<ol>
<li><a href="#sec-units">Units and Conventions</a></li>
<li><a href="#sec-schwarzschild">Schwarzschild Metric and Null Geodesics</a></li>
<li><a href="#sec-binet">The Binet Equation for Photons</a></li>
<li><a href="#sec-integration">Numerical Integration (Leapfrog & RK4)</a></li>
<li><a href="#sec-kerr">Kerr Black Hole & Frame Dragging</a>
<ol>
<li><a href="#sec-kerr-perturbative">Public spin approximation (all exposed modes)</a></li>
<li><a href="#sec-kerr-mino">True Kerr geodesics (Mino-time formulation)</a></li>
</ol>
</li>
<li><a href="#sec-isco">ISCO: Innermost Stable Circular Orbit</a></li>
<li><a href="#sec-accretion">Accretion Disk Models</a>
<ol>
<li><a href="#sec-thin-disk">Thin Disk (Novikov–Thorne / Shakura–Sunyaev)</a></li>
<li><a href="#sec-thick-torus">Thick Torus (ADAF/RIAF)</a></li>
<li><a href="#sec-slim-disk">Slim Disk (Super-Eddington)</a></li>
<li><a href="#sec-self-irradiation">Disk Self-Irradiation (Returning Radiation)</a></li>
</ol>
</li>
<li><a href="#sec-blackbody">Black-Body Radiation & Spectrum</a></li>
<li><a href="#sec-grav-redshift">Gravitational Redshift</a></li>
<li><a href="#sec-doppler">Relativistic Doppler Effect</a></li>
<li><a href="#sec-beaming">Relativistic Beaming & Liouville's Theorem</a></li>
<li><a href="#sec-aberration">Relativistic Aberration</a></li>
<li><a href="#sec-observer">Observer Kinematics & Time Dilation</a></li>
<li><a href="#sec-blueshift">Gravitational Blueshift & Hovering Observer</a>
<ol>
<li><a href="#sec-blueshift-static">Static (Hovering) Observer</a></li>
<li><a href="#sec-blueshift-freefall">Free-Falling Observer</a></li>
<li><a href="#sec-blueshift-impl">Implementation</a></li>
</ol>
</li>
<li><a href="#sec-jets">Relativistic Jets</a></li>
<li><a href="#sec-grmhd">GRMHD-Inspired Mode</a>
<ol>
<li><a href="#sec-grmhd-two-temp">Two-Temperature Plasma (R<sub>high</sub>)</a></li>
<li><a href="#sec-grmhd-synchrotron">Thermal Synchrotron Emission</a></li>
<li><a href="#sec-grmhd-mri">MRI Turbulence & MAD State</a></li>
<li><a href="#sec-grmhd-fishbone">Fishbone-Moncrief-Inspired Helper</a></li>
<li><a href="#sec-grmhd-turbulence-temperature">High-Frequency Chaos & Dynamic Thermal Bands</a></li>
<li><a href="#sec-grmhd-nonthermal">Non-Thermal Electrons (κ-distribution)</a></li>
<li><a href="#sec-grmhd-isco">Non-Zero ISCO Stress</a></li>
<li><a href="#sec-grmhd-bz">Blandford-Znajek Jet Power</a></li>
</ol>
</li>
<li><a href="#sec-volumetric">Volumetric Radiative Transfer</a></li>
<li><a href="#sec-tonemap">Tone Mapping & Color Science</a></li>
<li><a href="#sec-planet">Planet Model</a></li>
<li><a href="#sec-interior">Interior Black Hole & Analytical Escape Classification</a>
<ol>
<li><a href="#sec-binet-energy">Binet Conserved Energy</a></li>
<li><a href="#sec-escape-class">Escape vs. Capture Classification</a></li>
<li><a href="#sec-analytical-exit">Analytical Exit Direction</a></li>
</ol>
</li>
<li><a href="#sec-freefall">Free-Fall Dive & Observer Frame</a>
<ol>
<li><a href="#sec-radial-freefall">Radial Free-Fall Trajectory</a></li>
<li><a href="#sec-dive-frame">Locally Inertial Dive Frame</a></li>
<li><a href="#sec-interior-rendering">Interior Rendering Pipeline</a></li>
</ol>
</li>
<li><a href="#sec-cinematic-speed">Cinematic Auto-Speed Envelope</a></li>
<li><a href="#sec-comparison">Comparison with Reality</a></li>
<li><a href="#sec-limitations">Known Limitations & Approximations</a></li>
<li><a href="#sec-references">References</a></li>
</ol>
</nav>
<!-- ============================================================ -->
<!-- 1. UNITS -->
<!-- ============================================================ -->
<h2 id="sec-units">1. Units and Conventions</h2>
<p>
The simulation uses <strong>geometrized units</strong> where:
</p>
<ul>
<li>The <strong>Schwarzschild radius</strong> is set to unity: <em>r<sub>s</sub></em> = 1.</li>
<li>The <strong>speed of light</strong> <em>c</em> = 1 (one spatial unit per second of simulation time).</li>
<li>The <strong>black hole mass</strong> parameter <em>M</em> = <em>r<sub>s</sub></em>/2 = 0.5, since <em>r<sub>s</sub></em> = 2<em>GM</em>/<em>c</em>².</li>
</ul>
<p>
All distances in the simulation (observer distance, planet orbit, accretion disk extent) are expressed in
multiples of <em>r<sub>s</sub></em>. This normalization is standard in numerical relativity for Schwarzschild spacetimes
<sup><a href="#ref-mtw">[1]</a></sup>.
</p>
<div class="note">
<strong>Design choice:</strong> Setting <em>r<sub>s</sub></em> = 1 rather than <em>r<sub>g</sub></em> = <em>GM</em>/<em>c</em>² = 1 keeps equations simple:
the event horizon sits at <em>r</em> = 1, the photon sphere at <em>r</em> = 1.5, and the ISCO at <em>r</em> = 3
(for Schwarzschild). When converting to Kerr spin parameters, the code maps between
<em>r<sub>s</sub></em> and <em>r<sub>g</sub></em> units with the factor 0.5.
</div>
<!-- ============================================================ -->
<!-- 2. SCHWARZSCHILD METRIC -->
<!-- ============================================================ -->
<h2 id="sec-schwarzschild">2. Schwarzschild Metric and Null Geodesics</h2>
<p>
The spacetime around a non-rotating, uncharged black hole of mass <em>M</em> is described by the
<strong>Schwarzschild metric</strong> (1916) <sup><a href="#ref-schwarzschild">[2]</a></sup>:
</p>
<div class="eq">
d<em>s</em>² = −(1 − <em>r<sub>s</sub></em>/<em>r</em>) <em>c</em>² d<em>t</em>²
+ (1 − <em>r<sub>s</sub></em>/<em>r</em>)<sup>−1</sup> d<em>r</em>²
+ <em>r</em>² (dθ² + sin²θ dφ²)
</div>
<p>
where <em>r<sub>s</sub></em> = 2<em>GM</em>/<em>c</em>² is the Schwarzschild radius.
For photons (null geodesics), d<em>s</em>² = 0.
</p>
<p>
The motion of photons is governed by two conserved quantities arising from the metric's symmetries:
<strong>energy</strong> <em>E</em> (time-translation symmetry) and <strong>angular momentum</strong> <em>L</em> (rotational symmetry).
By restricting motion to the equatorial plane (θ = π/2), which is always possible by symmetry,
the orbit equation can be derived from these conservation laws and the null condition
<sup><a href="#ref-mtw">[1]</a></sup> <sup><a href="#ref-wald">[3]</a></sup>.
</p>
<!-- ============================================================ -->
<!-- 3. BINET EQUATION -->
<!-- ============================================================ -->
<h2 id="sec-binet">3. The Binet Equation for Photons</h2>
<p>
The core of the simulation's gravitational lensing is the <strong>Binet equation</strong> for null geodesics
in Schwarzschild spacetime. Using the substitution <em>u</em> = 1/<em>r</em>, the orbital equation for photons is
<sup><a href="#ref-mtw">[1]</a></sup> <sup><a href="#ref-wald">[3]</a></sup>
<sup><a href="#ref-chandrasekhar">[28]</a></sup>:
</p>
<div class="eq">
(d<em>u</em>/dφ)² = <em>r<sub>s</sub></em> <em>u</em>³ − <em>u</em>² + 1/<em>b</em>²
</div>
<p>
where <em>b</em> is the impact parameter. Differentiating with respect to φ yields the second-order ODE:
</p>
<div class="eq">
d²<em>u</em>/dφ² = −<em>u</em> + (3/2) <em>r<sub>s</sub></em> <em>u</em>²
</div>
<p>
In the simulation's units where <em>r<sub>s</sub></em> = 1, this becomes:
</p>
<div class="eq">
d²<em>u</em>/dφ² = −<em>u</em> + 1.5 <em>u</em>²
</div>
<p>
This is the <strong>exact Schwarzschild core</strong> implemented in the shader's
<code>geodesic_accel()</code> function when the optional spin perturbation is disabled.
The first term (−<em>u</em>) corresponds to the Newtonian inverse-square gravity, while the
second term (1.5<em>u</em>²) is the purely relativistic correction responsible for light bending,
the existence of the photon sphere, and the black hole shadow.
</p>
<h3>Key features of this equation</h3>
<ul>
<li><strong>Photon sphere:</strong> Setting the acceleration to zero with d<em>u</em>/dφ = 0 gives
<em>u</em> = 2/3, i.e., <em>r</em> = 3/2 = 1.5 <em>r<sub>s</sub></em>.
This is the unstable circular photon orbit confirmed by analytical solutions
<sup><a href="#ref-mtw">[1]</a></sup> <sup><a href="#ref-wald">[3]</a></sup>.</li>
<li><strong>Event horizon:</strong> Capture occurs when <em>u</em> ≥ 1 (i.e., <em>r</em> ≤ <em>r<sub>s</sub></em>).
The shader enforces this by checking <code>if (u >= 1.0) { shadow_capture = true; }</code>.</li>
<li><strong>Weak-field limit:</strong> For <em>u</em> → 0 (large <em>r</em>), the equation reduces to the
Newtonian −<em>u</em>, recovering straight-line propagation.</li>
</ul>
<div class="comparison">
<strong>Accuracy:</strong> The underlying orbital equation is <em>exact</em> for photon geodesics in
Schwarzschild spacetime. Rendered accuracy still depends on the numerical integrator, step budget,
and adaptive stepping used by the shader. The implementation follows the standard Schwarzschild
null-geodesic treatment in Misner, Thorne & Wheeler <sup><a href="#ref-mtw">[1]</a></sup>,
Wald <sup><a href="#ref-wald">[3]</a></sup>, and Chandrasekhar
<sup><a href="#ref-chandrasekhar">[28]</a></sup>.
</div>
<!-- ============================================================ -->
<!-- 4. NUMERICAL INTEGRATION -->
<!-- ============================================================ -->
<h2 id="sec-integration">4. Numerical Integration (Leapfrog & RK4)</h2>
<p>
The Binet ODE is a second-order equation integrated as a coupled first-order system:
</p>
<div class="eq">
d<em>u</em>/dφ = <em>v</em>
d<em>v</em>/dφ = −<em>u</em> + 1.5<em>u</em>² + <em>f</em><sub>spin</sub>
</div>
<p>
where <em>v</em> = d<em>u</em>/dφ and <em>f</em><sub>spin</sub> is the frame-dragging correction (see <a href="#sec-kerr">Section 5</a>).
The same integrators are used for the true Kerr geodesic equations (Section 5.2).
</p>
<h3>Leapfrog / Störmer-Verlet (default)</h3>
<p>
When RK4 is disabled, the simulation uses the <strong>Leapfrog</strong> (Störmer-Verlet) method,
a <strong>2nd-order</strong> integrator that is symplectic in its fixed-step form:
</p>
<pre><code>du += 0.5 * accel(u) * step; // half-step velocity
u += du * step; // full-step position
du += 0.5 * accel(u) * step; // half-step velocity</code></pre>
<p>
With a <strong>fixed step</strong>, Leapfrog is symplectic and avoids the secular energy drift that
afflicts non-symplectic methods like plain Euler. In this renderer, however, the same update rule
is combined with <strong>adaptive step sizing</strong> (see below), so the strict long-time symplectic
guarantee does not apply exactly to the implementation. In practice it still gives a low-cost,
stable second-order method that performs well for photons winding near the photon sphere.
</p>
<h3>Runge-Kutta 4th order (RK4)</h3>
<p>
When enabled, the simulation uses classical RK4
<sup><a href="#ref-chandrasekhar">[28]</a></sup>, which is fourth-order accurate, O(Δφ&sup4;):
</p>
<pre><code>k1 = accel(u)
k2 = accel(u + 0.5*step*du)
k3 = accel(u + 0.5*step*(du + 0.5*step*k1))
k4 = accel(u + step*(du + 0.5*step*k2))
u += (step/6)*(du_k1 + 2*du_k2 + 2*du_k3 + du_k4)
du += (step/6)*(k1 + 2*k2 + 2*k3 + k4)</code></pre>
<p>
RK4 is essential for accurate rendering of higher-order lensing images (photons that
complete multiple half-orbits around the photon sphere before escaping). In practice, it reduces
integration drift in the strong-lensing regime, although the final image still depends on the
available step budget.
</p>
<h3>Adaptive step sizing</h3>
<p>
The step size Δφ is refined near the photon sphere (<em>u</em> ≈ 0.667) using a Gaussian reduction factor:
</p>
<div class="eq">
step ×= 1 − 0.7 · exp(−12 (<em>u</em> − 0.667)²)
</div>
<p>
This reduces the step by up to 70% when the photon is near the unstable circular orbit,
where small numerical errors lead to significant trajectory deviations.
Additionally, the step is bounded by a maximum relative change in <em>u</em>,
preventing large jumps in regions of rapid curvature change.
</p>
<!-- ============================================================ -->
<!-- 5. KERR BLACK HOLE -->
<!-- ============================================================ -->
<h2 id="sec-kerr">5. Kerr Black Hole & Frame Dragging</h2>
<p>
A spinning black hole is described by the <strong>Kerr metric</strong> (1963)
<sup><a href="#ref-kerr">[5]</a></sup>, parameterized by the dimensionless spin <em>a</em>/<em>M</em>
(0 = Schwarzschild, 1 = maximally spinning). The full Kerr null geodesic equations require
the <strong>Carter constant</strong> <sup><a href="#ref-carter">[6]</a></sup> and Boyer-Lindquist
coordinate integration, which is computationally expensive for real-time rendering.
</p>
<h3 id="sec-kerr-perturbative">5.1. Public spin approximation (all exposed modes)</h3>
<p>
For all publicly exposed spin-enabled rendering modes, the simulation keeps the
Schwarzschild Binet photon solver and adds a perturbative <strong>frame-dragging correction</strong>:
</p>
<div class="eq">
d²<em>u</em>/dφ² = −<em>u</em> + 1.5<em>u</em>² + <em>a</em> ·
<em>s</em> · <em>k</em><sub>sq</sub> · 0.8 <em>u</em>³
</div>
<p>
where <em>a</em> is the spin parameter, <em>s</em> is the spin alignment factor
(dot product of orbital angular momentum with spin axis, ranging from −1 to +1), and
<em>k</em><sub>sq</sub> is a user-adjustable heuristic strength parameter ("shadow squeeze").
A cumulative azimuthal rotation
Δψ = <em>a</em>·<em>k</em><sub>sq</sub>·<em>s</em>·Δφ·0.85<em>u</em>³
is applied to the 3D ray position about the spin axis.
This perturbative spin treatment is applied only in the exterior public lensing path; the
dedicated interior pipeline falls back to pure Schwarzschild Binet dynamics so its analytical
escape classification remains exact.
In the public <code>Fast (Binet lensing)</code> mode, the implementation also applies a small
spin-dependent capture-threshold shift to squeeze the shadow boundary. That extra capture rule
is an implementation shortcut / visual heuristic, not an exact Kerr critical-curve result.
Together these approximations capture qualitative frame-dragging effects but cannot reproduce the exact Kerr shadow boundary.
</p>
<h3 id="sec-kerr-mino">5.2. True Kerr geodesics (Mino-time formulation)</h3>
<p>
The codebase also contains an <strong>experimental Kerr geodesic integrator</strong> based on the
separability discovered by <strong>Carter (1968)</strong>
<sup><a href="#ref-carter">[6]</a></sup>.
In <strong>Mino time</strong> σ (where dλ = Σ dσ), the geodesic equations
separate into independent ODEs in <em>r</em> and <em>θ</em>:
</p>
<div class="eq">
d²<em>r</em>/dσ² = R′(<em>r</em>)/2 = 2<em>r</em>P − (<em>r</em> − <em>M</em>)K
</div>
<div class="eq">
d²(cosθ)/dσ² = −cosθ(η + ξ² − <em>a</em>²) − 2<em>a</em>²cos³θ
</div>
<div class="eq">
dφ/dσ = <em>a</em>P/Δ + ξ/sin²θ − <em>a</em>
</div>
<p>where:</p>
<ul>
<li>P = <em>r</em>² + <em>a</em>² − <em>a</em>ξ</li>
<li>K = (ξ − <em>a</em>)² + η</li>
<li>Δ = <em>r</em>² − 2<em>Mr</em> + <em>a</em>²</li>
<li>ξ = <em>L<sub>z</sub></em>/<em>E</em> (angular momentum), η = <em>Q</em>/<em>E</em>² (Carter constant)</li>
</ul>
<p>
The radial and polar equations are <strong>polynomial in <em>r</em> and cosθ</strong>,
while the azimuthal equation remains rational through
Δ and sin²θ; taken together they are still computationally cheap per step.
The constants ξ and η
are currently initialized from the camera ray direction using flat-space expressions
and then projected onto the Kerr constraint surface
(d<em>r</em>/dσ)² = R(<em>r</em>). That makes this a promising exact-equation solver,
but not a validated user-facing Kerr rendering mode in its current state.
</p>
<p>
The 3D Cartesian position is reconstructed at each step from Boyer-Lindquist coordinates:
<em>x</em> = √(<em>r</em>² + <em>a</em>²) sinθ cosφ,
<em>y</em> = √(<em>r</em>² + <em>a</em>²) sinθ sinφ,
<em>z</em> = <em>r</em> cosθ.
Event-horizon capture uses the analytical
Kerr outer horizon <em>r</em><sub>+</sub> = <em>M</em> + √(<em>M</em>² − <em>a</em>²)
with a small numerical buffer in the current implementation.
</p>
<div class="comparison">
<strong>Accuracy:</strong> The separated Mino-time equations themselves are the exact Kerr null-geodesic
equations <sup><a href="#ref-carter">[6]</a></sup> <sup><a href="#ref-chandrasekhar">[28]</a></sup>.
In this repository, however, the feature remains experimental and is not presented as a validated
public rendering mode.
<br><br>
<strong>Current status:</strong> This integrator is <strong>work-in-progress</strong> and is not
yet exposed in the user interface. All user-facing modes currently use the same approximate Binet
photon solver described in Section 5.1. The "Kerr-inspired disk velocities" mode uses
Kerr equatorial angular velocity to drive disk matter but does not change the photon geodesic solver.
</div>
<!-- ============================================================ -->
<!-- 6. ISCO -->
<!-- ============================================================ -->
<h2 id="sec-isco">6. ISCO: Innermost Stable Circular Orbit</h2>
<p>
The ISCO marks the inner edge of a stable accretion disk. Matter inside the ISCO plunges
rapidly into the black hole. The ISCO radius depends on the black hole spin and was derived by
<strong>Bardeen, Press & Teukolsky (1972)</strong> <sup><a href="#ref-bpt">[8]</a></sup>:
</p>
<div class="eq">
<em>r</em><sub>ISCO</sub> = <em>r<sub>g</sub></em> (3 + <em>Z</em><sub>2</sub> ∓
√[(3 − <em>Z</em><sub>1</sub>)(3 + <em>Z</em><sub>1</sub> + 2<em>Z</em><sub>2</sub>)])
</div>
<p>where:</p>
<div class="eq">
<em>Z</em><sub>1</sub> = 1 + (1 − χ²)<sup>1/3</sup>
[(1 + χ)<sup>1/3</sup> + (1 − χ)<sup>1/3</sup>]
<br>
<em>Z</em><sub>2</sub> = √(3χ² + <em>Z</em><sub>1</sub>²)
</div>
<p>
with χ = <em>a</em>/<em>M</em> the dimensionless spin parameter, and − for prograde,
+ for retrograde orbits. In the code, this is implemented in the <code>calculateISCO()</code>
function in <code>js/app/core/renderer.js</code>. In the current UI, the sign of
<em>a</em>/<em>M</em> is used to mirror the black hole's spin direction, while the disk model
stays on the co-rotating branch; a separate retrograde-disk toggle is not exposed.
The implementation converts from gravitational radii
(<em>r<sub>g</sub></em> = <em>GM</em>/<em>c</em>²) to Schwarzschild radii
(<em>r<sub>s</sub></em> = 2<em>r<sub>g</sub></em>) with the factor 0.5.
</p>
<table>
<tr><th>Spin <em>a</em>/<em>M</em></th><th>ISCO (prograde) in <em>r<sub>s</sub></em></th><th>ISCO (retrograde) in <em>r<sub>s</sub></em></th></tr>
<tr><td>0 (Schwarzschild)</td><td>3.0</td><td>3.0</td></tr>
<tr><td>0.5</td><td>2.18</td><td>3.65</td></tr>
<tr><td>0.9</td><td>1.16</td><td>4.18</td></tr>
<tr><td>0.998 (near-extremal)</td><td>0.62</td><td>4.47</td></tr>
<tr><td>1.0 (extremal limit)</td><td>0.5</td><td>4.5</td></tr>
</table>
<div class="comparison">
<strong>Accuracy:</strong> The Bardeen-Press-Teukolsky ISCO formula is <em>exact</em> for equatorial circular
orbits in Kerr spacetime. The simulation's implementation faithfully follows this formula
<sup><a href="#ref-bpt">[8]</a></sup>.
</div>
<!-- ============================================================ -->
<!-- 7. ACCRETION DISK MODELS -->
<!-- ============================================================ -->
<h2 id="sec-accretion">7. Accretion Disk Models</h2>
<p>
The simulation offers three accretion disk models, each appropriate for different astrophysical regimes:
</p>
<!-- 7.1 Thin Disk -->
<h3 id="sec-thin-disk">7.1. Thin Disk (Shakura–Sunyaev-Type Profile with Kerr ISCO Inner Edge)</h3>
<p>
This is the default mode, modeling a geometrically thin, optically thick accretion disk
appropriate for <strong>luminous AGN (quasars)</strong> and <strong>stellar-mass X-ray binaries</strong>
accreting below the Eddington limit.
</p>
<h4>Temperature profile</h4>
<p>
The surface temperature follows the familiar <strong>zero-torque thin-disk proxy</strong>
used in the <strong>Shakura & Sunyaev (1973)</strong>
<sup><a href="#ref-ss73">[10]</a></sup> treatment and in the Newtonian-limit form often used
as a visual stand-in for <strong>Novikov & Thorne (1973)</strong>
<sup><a href="#ref-nt73">[11]</a></sup>:
</p>
<div class="eq">
<em>T</em>(<em>r</em>) = <em>T</em><sub>0</sub> · <em>x</em><sup>−3/4</sup>
· (1 − √(1/<em>x</em>))<sup>1/4</sup>
</div>
<p>
where <em>x</em> = <em>r</em>/<em>r</em><sub>in</sub> and <em>r</em><sub>in</sub> is the ISCO radius.
In this renderer, the <strong>inner edge</strong> tracks the Kerr ISCO, but the
<strong>flux profile itself is not the full spin-dependent Novikov-Thorne/Page-Thorne relativistic correction</strong>.
It is the simpler Shakura-Sunyaev-style zero-torque profile:
</p>
<ul>
<li>Gravitational energy release (viscous dissipation) ∝ <em>r</em><sup>−3</sup></li>
<li>Zero-torque boundary condition at the ISCO: the factor (1 − √(<em>r</em><sub>in</sub>/<em>r</em>))</li>
<li>Stefan-Boltzmann law: <em>F</em> = σ<em>T</em><sup>4</sup> ⇒ <em>T</em> ∝ <em>F</em><sup>1/4</sup></li>
</ul>
<h4>Flux profile</h4>
<p>
The radiated flux (energy per unit area per unit time):
</p>
<div class="eq">
<em>F</em>(<em>r</em>) ∝ (1/<em>x</em>³) · (1 − √(1/<em>x</em>))
</div>
<p>
This simple zero-torque profile peaks at
<em>r</em> = (49/36) <em>r</em><sub>in</sub> ≈ 1.36 <em>r</em><sub>in</sub>.
The code applies a normalization factor of 18.0 for visual brightness scaling.
</p>
<h4>Disk velocity</h4>
<p>
Matter in the thin disk follows <strong>Keplerian circular orbits</strong>. In the Schwarzschild
case, the renderer uses the familiar local orbital speed:
</p>
<div class="eq">
<em>v</em><sub>φ</sub> = 1 / √(2(<em>r</em> − 1))
</div>
<p>
This is the local azimuthal speed relative to a static Schwarzschild frame.
It approaches <em>c</em> as <em>r</em> → 1.5 (the photon sphere) and goes as
1/√(2<em>r</em>) at large distances, recovering the Newtonian Keplerian limit
<em>v</em> ∝ 1/√<em>r</em>.
</p>
<p>
In the Kerr-inspired disk-velocity mode, the code first uses the standard equatorial Kerr
angular velocity:
</p>
<div class="eq">
Ω = 1 / (<em>r</em><sub><em>g</em></sub><sup>3/2</sup> + <em>a</em>)
</div>
<p>
where <em>r<sub>g</sub></em> = 2<em>r</em> (converting from <em>r<sub>s</sub></em> to gravitational radii).
This is the standard Kerr equatorial Keplerian angular velocity
<sup><a href="#ref-bpt">[8]</a></sup>. The renderer then converts this to a flat-space azimuthal
speed for Doppler/beaming calculations. That captures the leading spin dependence, but it is not
a full local-tetrad Kerr velocity treatment. With the current UI's sign convention, negative
<em>a</em>/<em>M</em> values mirror the spin direction and the co-rotating disk velocity sign;
a separate retrograde-disk branch is not exposed.
</p>
<h4>Limb darkening</h4>
<p>
The thin disk emission includes <strong>Eddington limb darkening</strong>,
which accounts for the angle-dependent intensity of an optically thick atmosphere:
</p>
<div class="eq">
<em>I</em>(μ) = <em>I</em>(1) · (2/5 + 3/5 · μ)
</div>
<p>
where μ = cos θ<sub>emission</sub> is the cosine of the angle between the
emitted photon and the disk normal (z-axis). This reduces the brightness of disk regions
viewed at grazing angles, which is particularly visible for the underside of the disk
seen through gravitational lensing.
</p>
<h4>Sub-step disk crossing detection</h4>
<p>
Near the photon sphere (<em>r</em> ≈ 1.5 <em>r<sub>s</sub></em>), photon paths wind tightly and a single
integration step can skip over the <em>z</em> = 0 equatorial plane. To reliably capture
<strong>secondary and tertiary Einstein rings</strong>, the disk-crossing test is subdivided
into 4 sub-checks when the photon is close to the photon sphere and the step subtends
a large angle. This ensures that higher-order lensed images of the disk are not missed
by the finite step size.
</p>
<h4>Turbulence</h4>
<p>
The disk surface displays procedural turbulence using <strong>fractional Brownian motion (fBm)</strong>
noise layered over spiral arm structures. This is purely artistic — real disk turbulence arises from
the <strong>magnetorotational instability (MRI)</strong> <sup><a href="#ref-balbus">[12]</a></sup>
and requires full 3D magnetohydrodynamic (MHD) simulations to model accurately.
However, the visual character (filamentary, multi-scale structure) is qualitatively reasonable.
</p>
<!-- 7.2 Thick Torus -->
<h3 id="sec-thick-torus">7.2. Thick Torus (ADAF/RIAF)</h3>
<p>
This mode models an <strong>advection-dominated accretion flow (ADAF)</strong>
<sup><a href="#ref-narayan94">[13]</a></sup>, also known as a
<strong>radiatively inefficient accretion flow (RIAF)</strong>.
This is appropriate for <strong>low-luminosity AGN</strong> like <strong>M87*</strong> and
<strong>Sgr A*</strong> — the two targets imaged by the Event Horizon Telescope (EHT)
<sup><a href="#ref-eht">[14]</a></sup>.
</p>
<h4>Geometry</h4>
<p>
The torus has a configurable center radius <em>r</em><sub>0</sub> and aspect ratio <em>H</em>/<em>R</em>.
The vertical density profile follows a <strong>Gaussian</strong>, motivated by
hydrostatic equilibrium in a vertically isothermal atmosphere:
</p>
<div class="eq">
ρ(<em>R</em>, <em>z</em>) ∝ exp(−<em>z</em>² / 2<em>H</em>²)
</div>
<h4>Emissivity</h4>
<p>
The radial emissivity uses a hybrid model combining a <strong>configurable power-law decay</strong>
with a <strong>Gaussian torus profile</strong> centered at <em>r</em><sub>0</sub>.
The self-similar ADAF solution of <strong>Narayan & Yi (1994)</strong>
<sup><a href="#ref-narayan94">[13]</a></sup> predicts:
</p>
<ul>
<li>Density: <em>n</em> ∝ <em>r</em><sup>−3/2</sup></li>
<li>Temperature: <em>T</em> ∝ <em>r</em><sup>−1</sup></li>
<li>Bremsstrahlung emissivity: <em>j<sub>ff</sub></em> ∝ <em>n</em>² <em>T</em><sup>1/2</sup>
∝ <em>r</em><sup>−β</sup></li>
</ul>
<p>
The power-law index β ("radial falloff") is <strong>user-configurable</strong>
(default 2.5, range 0.5–5.0). The pure Narayan & Yi value is β = 3.5,
but GRMHD simulations show values typically in the range 2–4 depending on
magnetic field topology and heating prescriptions.
The emissivity is blended 50/50 with a Gaussian profile
exp(−1.2 ((<em>r</em>−<em>r</em><sub>0</sub>)/(0.6<em>r</em><sub>0</sub>))²)
to produce a visually defined torus ring rather than a centrally-concentrated blob.
Inside <em>r</em><sub>0</sub>, the falloff exponent is reduced to 0.6β to prevent
excessive brightening toward the center.
</p>
<h4>Opacity</h4>
<p>
The absorption coefficient is <strong>user-configurable</strong> (default 0.015, range 0.001–0.15).
ADAFs are optically thin to bremsstrahlung radiation, so the default is low. Higher values
produce a more opaque, surface-like torus; lower values let more emission accumulate along
the line of sight through the volume.
</p>
<h4>Outer extent</h4>
<p>
The torus outer edge is set by a <strong>configurable multiplier</strong> (default 3.5×)
relative to <em>r</em><sub>0</sub>, with a smooth falloff. This controls how far
the accretion flow extends radially.
</p>
<h4>Electron temperature</h4>
<p>
The two-temperature ADAF model (<strong>Narayan & Yi 1995</strong> <sup><a href="#ref-narayan95">[15]</a></sup>;
<strong>Esin et al. 1997</strong> <sup><a href="#ref-esin">[16]</a></sup>) predicts
<em>T</em><sub>e</sub> ∝ <em>r</em><sup>−0.5</sup>:
</p>
<div class="eq">
<em>T</em>(<em>r</em>) = <em>T</em><sub>0</sub> · (<em>r</em><sub>0</sub>/<em>r</em>)<sup>0.5</sup>
</div>
<h4>Gas velocity</h4>
<p>
ADAF gas orbits at roughly 50% of the Keplerian velocity (sub-Keplerian due to significant
radial pressure support), consistent with ADAF theory
<sup><a href="#ref-narayan94">[13]</a></sup>.
</p>
<!-- 7.3 Slim Disk -->
<h3 id="sec-slim-disk">7.3. Slim Disk (Super-Eddington)</h3>
<p>
The slim disk model represents <strong>super-Eddington accretion</strong>, where the accretion rate
exceeds the critical value at which radiation pressure balances gravity. Key features:
</p>
<ul>
<li><strong>Geometrically thicker</strong> than the thin disk near the ISCO due to radiation pressure puffing.</li>
<li><strong>Extends inside the ISCO</strong>: matter continues to radiate in the plunging region, unlike
the thin disk which has zero emission inside <em>r</em><sub>ISCO</sub>.</li>
<li><strong>Advection-dominated near ISCO:</strong> inside the ISCO, <em>T</em> ∝ <em>r</em><sup>−0.5</sup>
(advection-dominated, similar to ADAF behavior).</li>
</ul>
<p>
This mode is appropriate for <strong>ultraluminous X-ray sources (ULXs)</strong> and
<strong>narrow-line Seyfert 1 galaxies</strong>.
</p>
<h4>Configurable parameters</h4>
<p>
Three user-adjustable parameters control the slim disk appearance:
</p>
<ul>
<li><strong>H/R ratio</strong> (default 0.15, range 0.05–0.5): The base height-to-radius ratio
of the disk. Higher values produce a geometrically thicker flow. The canonical slim-disk
H/R is 0.1–0.3 depending on the accretion rate.</li>
<li><strong>Opacity</strong> (default 0.6, range 0.1–2.0): The absorption coefficient controlling
how opaque/surface-like the disk appears. Higher values produce a sharper photosphere;
lower values give a more volumetric, translucent appearance.</li>
<li><strong>ISCO puff factor</strong> (default 2.5, range 0–6): Controls how much the disk
thickens near and inside the ISCO due to radiation pressure. The disk height at
radius <em>r</em> is:
<div class="eq">
<em>H</em>(<em>r</em>) = <em>r</em> · (H/R) · (1 + <em>f</em><sub>puff</sub> · exp(−1.5 max(<em>r</em> − <em>r</em><sub>ISCO</sub>, 0)))
</div>
where <em>f</em><sub>puff</sub> is the puff factor. Setting it to 0 gives a constant H/R;
higher values produce the characteristic radiation-pressure "puffing" expected in
super-Eddington flows.</li>
</ul>
<!-- 7.4 Self-Irradiation -->
<h3 id="sec-self-irradiation">7.4. Disk Self-Irradiation (Returning Radiation)</h3>
<p>
An important relativistic correction incorporated into both the thin and slim disk models is
<strong>returning radiation</strong>. Light emitted from the inner regions of the accretion disk
(near the ISCO) does not always escape to infinity. Because of the strong gravitational lensing
near the black hole, a significant fraction of the emitted flux is bent back and strikes the disk
again, depositing its energy back into the plasma
<sup><a href="#ref-cunningham">[45]</a></sup>.
</p>
<p>
In this renderer, returning radiation is represented by a <strong>heuristic, Cunningham-inspired
inner-disk enhancement</strong>, not by recursive ray tracing or a calibrated transfer-function
evaluation. The boost is made stronger for higher spin and is forced to decay rapidly outward
as <em>r</em><sup>−3.5</sup>, so the visual effect remains concentrated near the ISCO. By the
Stefan-Boltzmann law, the effective display temperature is then raised by the fourth root of
this enhancement factor. This produces a plausible extra brightening of the inner disk, but it
should be read as a visualization proxy rather than a quantitative returning-radiation result.
</p>
<!-- ============================================================ -->
<!-- 8. BLACK-BODY RADIATION -->
<!-- ============================================================ -->
<h2 id="sec-blackbody">8. Black-Body Radiation & Spectrum</h2>
<p>
The accretion disk's thermal emission is modeled as <strong>black-body (Planck) radiation</strong>.
At each point on the disk, the local temperature determines the emitted spectrum via Planck's law:
</p>
<div class="eq">
<em>B</em><sub>ν</sub>(<em>T</em>) = (2<em>h</em>ν³/<em>c</em>²) / (exp(<em>h</em>ν/<em>kT</em>) − 1)
</div>
<p>
Rather than evaluating this integral at runtime, the simulation uses a <strong>precomputed spectrum
lookup texture</strong> (<code>spectra.png</code>):
</p>
<ul>
<li>One row maps temperature → RGB color (black-body chromaticity).</li>
<li>Another row maps wavelength → RGB for monochromatic lines (e.g., Hα at 656.28 nm).</li>
<li>A third row enables inverse temperature lookup from spectral ratios, used for
Doppler-shifting the Milky Way background.</li>
</ul>
<p>
The disk temperature range spans <strong>4,500 K</strong> (reddish-orange, like a cool K-type star)
to <strong>30,000 K</strong> (blue-white, like an O-type star). In this renderer these values should
be read as <strong>effective display-side color temperatures</strong>, not as mass-scaled physical
inner-disk temperatures; real stellar-mass accretion disks can peak far into the UV/X-ray.
</p>
<!-- ============================================================ -->
<!-- 9. GRAVITATIONAL REDSHIFT -->
<!-- ============================================================ -->
<h2 id="sec-grav-redshift">9. Gravitational Redshift</h2>
<p>
Photons climbing out of a gravitational potential well lose energy. The gravitational redshift
between an emission radius <em>r<sub>e</sub></em> and an observer at <em>r<sub>o</sub></em> in
Schwarzschild spacetime is <sup><a href="#ref-mtw">[1]</a></sup>:
</p>
<div class="eq">
1 + <em>z</em> = √[(1 − <em>r<sub>s</sub></em>/<em>r<sub>o</sub></em>) /
(1 − <em>r<sub>s</sub></em>/<em>r<sub>e</sub></em>)]
</div>
<p>
In the simulation's units (<em>r<sub>s</sub></em> = 1):
</p>
<div class="eq">
<em>g</em>(<em>r<sub>e</sub></em>) = √[(1 − 1/<em>r<sub>e</sub></em>) / (1 − 1/<em>r<sub>o</sub></em>)]
</div>
<p>
This factor is applied as a multiplicative shift to the effective temperature:
<em>T</em><sub>obs</sub> = <em>T</em><sub>emit</sub> · <em>g</em>.
For a full Planck spectrum, the identity
<em>B<sub>ν</sub></em>(<em>DT</em>) = <em>D</em>³ <em>B<sub>ν/D</sub></em>(<em>T</em>)
means a temperature rescaling would encode both frequency shift and specific-intensity scaling.
In this renderer, however, the lookup texture stores <strong>chromaticity</strong> rather than
absolute Planck radiance, so the hue shift and the explicit <em>D</em>³ brightness factor
are handled separately (see Section 11).
</p>
<h3>Implementation note</h3>
<p>
The renderer applies the <strong>static Schwarzschild redshift factor</strong>
√[(1 − 1/<em>r<sub>e</sub></em>) / (1 − 1/<em>r<sub>o</sub></em>)]
to the source temperature first, then applies a separate special-relativistic transfer factor
for moving emitters:
</p>
<div class="eq">
<em>f</em><sub>transfer</sub> = γ(1 + <b>v</b> · <b>n̂</b>)
</div>
<p>
This factorization keeps the static gravitational piece and the local kinematic piece separate,
so the transverse time-dilation part encoded in γ is not counted twice. It is still a
<strong>local-frame approximation</strong>, not a full invariant GR transfer calculation built from
emitter tetrads and constants of motion, so the thin disk is most faithful in the
non-spinning Schwarzschild limit and becomes progressively more approximate in plunging,
volumetric, and Kerr-inspired modes.
</p>
<div class="comparison">
<strong>Accuracy:</strong> The static Schwarzschild redshift law is exact for stationary emitters.
Combined with the separate SR Doppler factor it gives a consistent local approximation for moving
emitters in this renderer, but it is not a full GR redshift treatment for arbitrary source motion.
</div>
<!-- ============================================================ -->
<!-- 10. RELATIVISTIC DOPPLER EFFECT -->
<!-- ============================================================ -->
<h2 id="sec-doppler">10. Relativistic Doppler Effect</h2>
<p>
Moving matter in the accretion disk introduces a Doppler shift. The local
special-relativistic Doppler factor used for emitter or observer motion is
<sup><a href="#ref-rindler">[17]</a></sup>:
</p>
<div class="eq">
<em>D</em> = 1 / [γ(1 + <b>v</b> · <b>n̂</b>)]
</div>
<p>
where γ = 1/√(1 − <em>v</em>²) is the Lorentz factor, <b>v</b> is the emitter's
velocity, and <b>n̂</b> is the photon direction at the emission point.
</p>
<p>
In the simulation, the kinematic transfer factor along a ray is:
</p>
<div class="eq">
<em>f</em><sub>transfer</sub> = 1/<em>D</em><sub>observer</sub> · 1/<em>D</em><sub>emitter</sub>
= γ<sub>obs</sub>(1 + <b>v</b><sub>obs</sub> · <b>n̂</b>)
· γ<sub>emit</sub>(1 + <b>v</b><sub>emit</sub> · <b>n̂</b>)
</div>
<p>
The static gravitational redshift factor from <a href="#sec-grav-redshift">Section 9</a>
is applied separately.
</p>
<p>
This factor is applied to the disk temperature: <em>T</em><sub>obs</sub> = <em>T</em><sub>emit</sub> /
<em>f</em><sub>transfer</sub>. A blueshift (<em>f</em> < 1) raises the observed temperature (approaching
side), while a redshift (<em>f</em> > 1) lowers it (receding side). This creates the characteristic
<strong>left-right brightness asymmetry</strong> in the disk image.
</p>
<div class="comparison">
<strong>Accuracy:</strong> The relativistic Doppler formula itself is exact. The blue/red asymmetry in the
accretion disk is one of the most prominent observational signatures, confirmed theoretically
by Luminet (1979) <sup><a href="#ref-luminet">[18]</a></sup> and computationally by the
<em>Interstellar</em> team (James et al. 2015) <sup><a href="#ref-interstellar">[19]</a></sup>.
In the renderer, extreme transfer factors are guarded by minimum/maximum clamps for numerical
stability, so the implementation should be read as exact only until those guardrails activate.
</div>
<!-- ============================================================ -->
<!-- 11. RELATIVISTIC BEAMING -->
<!-- ============================================================ -->
<h2 id="sec-beaming">11. Relativistic Beaming & Liouville's Theorem</h2>
<p>
Beyond the color/temperature shift, relativistic motion also changes the observed <strong>intensity</strong>
of radiation. For thermal emitters and the background-sky proxy, the simulation offers two beaming modes.
Jets use a separate synchrotron beaming law described in Section 15.
</p>
<h3>Physical beaming (D³ Liouville)</h3>
<p>
From Liouville's theorem in phase space, the quantity <em>I<sub>ν</sub></em>/ν³ is a
Lorentz invariant along a photon's path <sup><a href="#ref-rybicki">[20]</a></sup>. For a black-body source,
this means:
</p>
<div class="eq">
<em>I</em><sub>obs</sub> = <em>D</em>³ <em>I</em><sub>emit</sub>
</div>
<p>
where <em>D</em> is the Doppler factor. Although the Planck function satisfies
<em>B</em><sub>ν</sub>(<em>DT</em>) = <em>D</em>³ <em>B</em><sub>ν/D</sub>(<em>T</em>),
the simulation's spectrum texture stores <strong>chromaticity</strong> (normalized color) rather than
full Planck intensities. Therefore the temperature shift <em>T</em> → <em>DT</em> only changes
the observed <em>hue</em>, not the brightness. The <em>D</em>³ intensity factor must be —
and is — applied explicitly to the emitted intensity.
</p>
<p>
In the current implementation, this explicit intensity factor is applied consistently to
all thermal emitters that use the black-body lookup (thin disk, thick torus, slim disk,
and planet illumination) and to the background-sky proxy in physical mode. The jet branches
keep their own synchrotron beaming law rather than using the D<sup>3</sup>/cinematic black-body toggle.
</p>
<p>
For numerical stability, several shading paths clamp extreme transfer factors before applying
the thermal D<sup>3</sup> correction, and the background-sky boost is capped at a large finite value.
In cinematic mode, the background uses the same softened observer-frame beaming curve as the rest
of the non-physical path. These are implementation guardrails / presentation choices, not changes
to the underlying exact transfer law.
</p>
<h3>Cinematic beaming</h3>
<p>
For artistic rendering (similar to the <em>Interstellar</em> movie visualization), the simulation
offers a softened beaming model: