```
Photon redshift for Schwarzschild black holes

https://en.wikipedia.org/wiki/Gravitational_redshift 2 G M
Rs = -------
c^2

R1 (R2 - Rs)
f1 = f2 sqrt[ -------------- ]
R2 (R1 - Rs)

f2 - f1
z = ---------
f1

M = black hole mass
G = gravitational constant
c = speed of light in vacuum
f1 = observed frequency
R1 = observer distance from singularity (ie. center of mass of the black hole), > Rs
f2 = emitted frequency
R2 = emitter distance from singularity, > Rs
z = redshift
[-z = blueshift]

Calculated in two phases,
phase 1:  Photon redshift from different emitter distances as observed at R1.
Emitter starts at 1e12 meters away from the black hole, and approaches
all the way to 1e-24m (billionth of a proton radius, or so).
For each emitter distance, observed frequency [Hz] and redshift [dimensionless] are displayed.

phase 2:  Photon redshift from selected emitter distance at different observer distances.
Observer starts at 1 meter away from the event horizon, and gains distance
up the decades all the way to 1e18m (>100ly)
For each observer distance, observed frequency [Hz] and redshift [dimensionless] are displayed.

Input as optional GET parameters [with default]:
M = mass in Msols 
R1 = observer distance in meters [1.49597871e11]
f2 = emitted frequency in Hertz' [1e20]
d = emitter distance from event horizon in phase 2 in meters [0.001]
DIGITS = request more decimal places for calculations 

Examples:

Solar mass black hole observed from Earth:  http://rubor.org/schwarzschildarb.php
Same but with an emitted visible photon:  http://rubor.org/schwarzschildarb.php?f2=0.565e15
Sgr A* from 1au:  http://rubor.org/schwarzschildarb.php?M=4.1e6
Gargantua from 3au (~Miller's planet):  http://rubor.org/schwarzschildarb.php?M=1e8&R1=4.48e11
10 Sols & emit from 1m above EH in phase 2:  http://rubor.org/schwarzschildarb.php?M=10&d=1
Msol, visible, emitted from Rsol:  http://rubor.org/schwarzschildarb.php?f2=0.565e15&d=6.957e8
Solar mass observed from Venus, emit a microwave:  http://rubor.org/schwarzschildarb.php?f2=2.45e9&R1=108208930000

ESA 360° black hole visualisation

```

```Mass M = 1 Msol
Schwarzschild radius Rs = 1.9747458161907E-8 a.u. (2.9541776986828km)

Phase 1:  emitter moves towards event horizon
Emission distance R2 = Rs + d (variable)
Observer distance R1 = 1.082089e+11m
Emitted frequency f2 = 2450000000.000000Hz

d [m]          f1 [Hz]        z
1.000000e+12	 2.450000e+9	-1.217325e-8 (-0.00)
1.000000e+11	 2.450000e+9	1.120546e-9 (0.00)
1.000000e+10	 2.450000e+9	1.340585e-7 (0.00)
1.000000e+9	 2.449996e+9	1.463437e-6 (0.00)
1.000000e+8	 2.449964e+9	1.475713e-5 (0.00)
1.000000e+7	 2.449638e+9	1.476843e-4 (0.00)
1.000000e+6	 2.446389e+9	1.475986e-3 (0.00)
1.000000e+5	 2.414594e+9	1.466337e-2 (0.01)
1.000000e+4	 2.152589e+9	1.381642e-1 (0.14)
1.000000e+3	 1.232077e+9	9.885114e-1 (0.99)
1.000000e+2	 4.433216e+8	4.526461e+0 (4.53)
1.000000e+1	 1.423030e+8	1.621679e+1 (16.22)
1.000000e+0	 4.506862e+7	5.336155e+1 (53.36)
1.000000e-1	 1.425412e+7	1.708801e+2 (170.88)
1.000000e-2	 4.507617e+6	5.425244e+2 (542.52)
1.000000e-3	 1.425436e+6	1.717772e+3 (1717.77)
1.000000e-4	 4.507625e+5	5.434235e+3 (5434.23)
1.000000e-5	 1.425436e+5	1.718672e+4 (17186.72)
1.000000e-6	 4.507625e+4	5.435135e+4 (54351.35)
1.000000e-7	 1.425436e+4	1.718762e+5 (171876.21)
1.000000e-8	 4.507625e+3	5.435225e+5 (543522.47)
1.000000e-9	 1.425436e+3	1.718771e+6 (1718771.13)
1.000000e-10	 4.507625e+2	5.435234e+6 (5435233.69)
1.000000e-11	 1.425436e+2	1.718772e+7 (17187720.25)
1.000000e-12	 4.507625e+1	5.435235e+7 (54352345.94)
1.000000e-13	 1.425436e+1	1.718772e+8 (171877211.51)
1.000000e-14	 4.507625e+0	5.435235e+8 (543523468.41)
1.000000e-15	 1.425436e+0	1.718772e+9 (1718772124.10)
1.000000e-16	 4.507625e-1	5.435235e+9 (5435234693.13)
1.000000e-17	 1.425436e-1	1.718772e+10 (17187721250.03)
1.000000e-18	 4.507625e-2	5.435235e+10 (54352346940.34)
1.000000e-19	 1.425436e-2	1.718772e+11 (171877212509.32)
1.000000e-20	 4.507625e-3	5.435235e+11 (543523469412.40)
1.000000e-21	 1.425436e-3	1.718772e+12 (1718772125102.21)
1.000000e-22	 4.507625e-4	5.435235e+12 (5435234694132.85)
1.000000e-23	 1.425436e-4	1.718772e+13 (17187721251031.25)
1.000000e-24	 4.507625e-5	5.435235e+13 (54352346941339.64)

Phase 2:  observer moves away from the horizon
Emission distance R2 = Rs + 1.000000e-3m
Observer distance R1 = variable
Emitted frequency f2 = 2450000000.000000Hz

R1 = Rs + [m]      f1 [Hz]        z
1.000000e+0	7.748890e+7	30.62
1.000000e+1	2.454143e+7	98.83
1.000000e+2	7.877617e+6	310.01
1.000000e+3	2.834496e+6	863.35
1.000000e+4	1.622380e+6	1509.13
1.000000e+5	1.446338e+6	1692.93
1.000000e+6	1.427540e+6	1715.24
1.000000e+7	1.425646e+6	1717.52
1.000000e+8	1.425457e+6	1717.75
1.000000e+9	1.425438e+6	1717.77
1.000000e+10	1.425436e+6	1717.77
1.000000e+11	1.425436e+6	1717.77
1.000000e+12	1.425436e+6	1717.77
1.000000e+13	1.425436e+6	1717.77
1.000000e+14	1.425436e+6	1717.77
1.000000e+15	1.425436e+6	1717.77
1.000000e+16	1.425436e+6	1717.77
1.000000e+17	1.425436e+6	1717.77
1.000000e+18	1.425436e+6	1717.77
1.000000e+19	1.425436e+6	1717.77
```

``` Bonus GET parameters for controlling the loops:
p1s = phase 1 loop start, 'outerspace', f.e. 1e24
p1d = phase 1 loop step divider, f.e. 10 or 1e1 (must be > 1)
p1e = phase 1 loop end, ~event horizon, f.e. 1e-32

p2s = phase 2 loop start, ~event horizon, f.e. 1e-24
p2d = phase 2 loop step multiplier, f.e. 10 or 1e1
p2e = phase 2 loop end, 'outerspace', f.e. 1e32

Input is handled via PHPs sprintf, which limits