This question already has an answer here:
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?