Ray tracing in General Relativity I would like to find out what one would see at the Schwarzschild radius of a massive non-rotating black hole, if the black hole is surrounded by a bright ring.
For that, I would place the observer at a certain $r_0,\theta_0,\phi_0=(R_S,\theta,0)$ and look in a certain direction $\alpha,\beta$ (looking outwards) and ask where a light ray that ends up with these parameter originates (reversing time). More specifically, at what radius in the ring it originates (if it crosses the ring).
This should be soluble somehow using the metric, either analytical or numerically, by assuming the gradient of the potential is small in some small range and computing a small step in the light ray. 
My question is: How can I get a formula for the light ray with $(r,\theta,\phi)$ as a function of time, which arrives at $(r_0,\theta_0,\phi_0)$ from angle $\alpha,\beta$ at time $t=0$?
I have found this GR lecture http://eagle.phys.utk.edu/guidry/astro421/lectures/lecture490_ch9.pdf but it does not give a light rays path. I also found the gyoto software, but it can only compute radiation for an observer far from the black hole.
Update
So I followed the derivation in https://en.wikipedia.org/wiki/Schwarzschild_geodesics and understand how to derive the equation
$$ \left( \frac{du}{d\varphi} \right)^{2} = \frac{1}{b^{2}} - \left( 1 - u r_{s} \right) \left( \frac{1}{a^{2}} + u^{2} \right)  $$
The right side of which can be written as a 3rd order polynomial, whose roots I can determine. 
A number of things seem still unclear to me:


*

*How do they suddenly jump to the "sinus amplitudinus function" as a solution $u(\varphi)$ for the fundamental orbital equation?

*If $u_1$, $u_2$ are the conjugate roots (complex numbers), and $u_3$ is the real root, then the equation $$ u = u_{1} + \left( u_{2} - u_{1} \right) \, \mathrm{sn}^{2}\left( \frac{1}{2} \varphi \sqrt{r_{s} \left( u_{3} - u_{1} \right)} + \delta \right) $$ will have a complex argument $u_3-u_1$, which is incompatible with the sn function?

*How do I go from $u(\varphi)$ to $u(\tau)$ or $u(t)$? I think there should be multiple solutions for a single phi, e.g. in processing orbits.

*How do I choose $a$ and $b$? I think $a$ is like an angular momentum, and related to the starting potential. $b$ is related to the closest radius?

 A: The light ray in general relativity travels along the null geodesic, which is determined by the simple equation
$$ g_{\mu \nu} (x) \frac{dx^{\mu}}{d\tau} \frac{dx^{\nu}}{d\tau} = 0, $$
where $g_{\mu \nu}$ in your case is the Schwarzschild metric. Using this equation and the initial condition (angle $\alpha$) you should be able to trace your light ray back in time and restore it's initial position at any $t$.
There is a small subtlety: the evolution parameter ($\tau$) is arbitrary, which means that the equation above has multiple solutions. This is due to the reparametrization invariance, which is the gauge symmetry of the relativistic particle. In order to receive definite answers, you can use the $\tau = t = x^0$ gauge (by simply saying that your $\tau$ is the physical time of an observer at infinity).
Update:
OK, I will answer your questions.


*

*The $sn$ function is the solution of the differential equation above

*Why? $sn$ is defined on the complex plane, as far as I know.

*You don't. This equation tells you how $u=1/r$ depends on $\phi$.

*$a$ and $b$ are the parameters which you should fix with your initial conditions.
But I don't see why you need those equations. The shape of an orbit of a planet? I thought you needed to trace the light ray back in time? Why didn't you do what I suggested in this answer?
