Black hole: horizon, shadow and a ray-traced image, step by step — a TI-89 Titanium program
HORIZON is a TI-89 BASIC program for the TI-89 Titanium. A black hole in the textbook model (Schwarzschild, light bent by u''=3u²−u, a thin disk from 6M to 20M) from its mass, distance and your view angle. Seven steps: the event horizon, the shadow's size seen from Earth (beside the EHT's 51.8 µas for Sgr A*), light bending traced ray by ray on the graph screen, the innermost stable orbit and how clocks slow down, a ray-traced picture of the black hole and its disk, the tides at the horizon, and Hawking's temperature and lifetime.
The picture has two settings: quick (one ray per 4×4-pixel cell, the default: about half an hour on a real TI-89) or full (158×76 pixels, 6004 rays: about 4 hours on a TI-89, about a minute in E-Calc).
What it asks for and what it shows
It asks for 3 values at its prompts, after you pick option 1 from its menu. In the example below it shows HORIZON · TEXTBOOK MODEL, Schwarzschild, G, r in M, so rs, light: u'', thin disk from 6M to 20M, rays: RK4 on lists, STEP 1 OF 7: EVENT HORIZON, rs, 4.297 million suns:, STEP 2 OF 7: THE SHADOW, photon sphere r, seen from 8277 pc:, EHT 2022: 51.8+/-2.3 µas, STEP 3 OF 7: LIGHT BENDING, STEP 4 OF 7: ISCO + TIME, clocks (far, STEP 5 OF 7: THE IMAGE, RK4: 100+100 steps each, 4×4 cells, view 80°, 4×4 dither: 17 shades, STEP 6 OF 7: TIDES, stretch Δa, at the horizon, L, STEP 7 OF 7: HAWKING, T, HORIZON · SUMMARY, you'd feel nothing.
Example run
One of its oracle test cases. The inputs are typed in order, and the results are the values the case expects on the screen.
| Step | Value |
|---|---|
| You enter | |
| Menu | option 1 |
| Input 1 | 4.297 |
| Input 2 | 8277 |
| Input 3 | 80 |
| The screen shows | |
| Text | HORIZON · TEXTBOOK MODEL |
Schwarzschild, G= | c=1: |
r in M, so rs= | 2M |
light: u''= | 3u²-u, u=M/r |
| Text | thin disk from 6M to 20M |
| Text | rays: RK4 on lists |
| Text | STEP 1 OF 7: EVENT HORIZON |
rs= | 2GM/c² |
| Text | 4.297 million suns: |
| Text | STEP 2 OF 7: THE SHADOW |
photon sphere r= | 1.5 rs |
| Text | seen from 8277 pc: |
| Text | EHT 2022: 51.8+/-2.3 µas |
| Text | STEP 3 OF 7: LIGHT BENDING |
| Text | STEP 4 OF 7: ISCO + TIME |
clocks (far= | 1): |
| Text | STEP 5 OF 7: THE IMAGE |
| Text | RK4: 100+100 steps each |
| Text | 4×4 cells, view 80° |
| Text | 4×4 dither: 17 shades |
| Text | STEP 6 OF 7: TIDES |
stretch Δa= | 2GML/r³ |
at the horizon, L= | 2 m: |
| Text | STEP 7 OF 7: HAWKING |
T= | hc³/(16π²GMk) |
| Text | HORIZON · SUMMARY |
| Text | you'd feel nothing |
How it's checked
6 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 355 checks.
How E-Code checks every program
Run it or put it on your calculator
- Open the library in the TI-89 Titanium calculator and pick “Black hole: horizon, shadow and a ray-traced image, step by step” (HORIZON).
- Put it on your own calculator with a computer and a USB cable, or type it in by hand.
Related programs
- Rocket launch, step by step
- Earth → Mars mission planner, step by step
- Asteroid deflection by a kinetic impactor, step by step
- Projectile from a height (dialog, m or ft)
- Kinematics: leave the two unknowns blank
All TI-89 Titanium physics programs · All TI-89 Titanium programs