Curvature of Light around a Black Hole I am in a computer graphics class at my university and for my final project, I have chosen to create a program which renders a simple non-rotating black hole and models the curvature of light around the black hole.  
The problem is that I have no idea how the math behind this works.  I have never taken differential equations so it is difficult for me to understand the geometry of space around black holes and how it warps the path of incoming light.  I would assume that this effect can be simulated by treating light as a Newtonian particle and calculating the deformation of the path by calculating the force of gravity by the black hole on the (massive) photon.
However, this is not an ideal solution and I would much rather simulate the actual curvature of light.  What I am wondering is, how exactly is this defined?  Given a photon and its distance from the black hole, how can I calculate the deviation of its path?
 A: You can try using this graph for reference:

This is from the equation (in this, units are used such that the speed of light is 1)
$$
E=\sqrt(1-2GM/r)/r
$$
Where the x axis is the distance from the black hole and the y axis is energy. Here G is the gravitational constant, r is the radius from the black hole and M is the mass of the black hole
Honestly I don't understand it all, I can't derive the equation, but it may help you with this. The "photon sphere" is at the peak of the curve, it's at an equilibrium position where photons moving tangentially will have a stable orbit around the black hole; this area is at the distance
$$
r=3GM
$$
As is intuitive from looking at the curve, if the light is further than that distance from the black hole, it will orbit before eventually escaping and if the light is closer then it will fall inward at an increasing rate before reaching
$$r=2GM$$
which is the Schwartz Child radius; here the light has no chance of escaping, even if was moving in a direction away from the black hole. The progression of light to be in a lower energy state here can be imagined as it rolling down a hill of the shape of this curve, while the visualization becomes more difficult when applying more dimensions to this but hopefully it shouldn't be too much trouble to program.
