As a sibling said, light travels forward in time, but also from a light source towards the camera. Raytracing traces rays backwards from the camera (because there are fewer rays to trace this way: just pick the ones that land on the camera and work backwards towards light sources). So backwards in time, trying to figure where the ray originally came from.
Anyway, you need to keep track of the time dimension as light moves (at constant speed) through spacetime in a straight line, but the black hole also stretches the time dimension, affecting what a straight line looks like for an outside observer.
That's my understanding at least, I am not that well versed in relativity.
Edit to make it more interesting: (x, y, z, t) is your position in spacetime, I do not quite understand how you can take its derivative¹ (probably not time-wise), but you can derive the four-velocity, the magnitude of which is constant (c). Intuitively (and probably naïvely) I understand this as: you move trough spacetime at constant speed. Therefore, if your spatial coordinates move faster, your time coordinate moves slower. This gives you back the special relativity results with time that "slows down" for fast-moving objects.
https://en.wikipedia.org/wiki/Four-vector
https://en.wikipedia.org/wiki/Four-velocity
¹: derivated along the "proper time" (time from the perspective of the moving object) according to Wikipedia. Still unsure how to compute that.
Four-velocity is defined on a timelike geodesic - its four functions take proper time as a parameter.
Proper time is a parametrization of a timelike geodesic which has several useful properties: it is monotonic allowing for orientability, and gives a unique real value for every infinitesimal point on the geodesic. This in turn means the tangent vector is preserved when parallel-transported along the proper-time-labelled timelike geodesic, with the gross physical meaning that the direction and speed of travel (in local forward/left/up coordinates for example [1]) does not change as proper time advances.
But we can label any curve -- or segment of a curve -- any way we want as coordinates are not physical. It's just that proper time is exceptionally useful as a coordinate. In particular, it satisfies the geodesic equation, gives us a four-velocity, which multiplied by the object's Lorentz-invariant mass gives us a four-momentum.
Unfortunately proper time is undefined on non-timelike geodesics, so can't be used for light, which in vacuum is always on a null geodesic.
However, there are functions that have the same features as proper time, namely monotonicity, uniqueness, and the preservation of the parallel-transported tangent vector. These are affine parametrizations. Proper time is an affine parametrization for timelike geodesics, and is usually denoted τ; null affine parametrizations which satisfy the geodesic equation are usually denoted λ.
We just can't use τ on null geodesics, since it is zero everywhere along one (so non-unique, and non-advancing). Statements based on the use of τ like "light experiences no time" or "light's path is infinitely length-contracted" improperly imply the use of τ.
However, if we use affine time λ, we get uniqueness, monotonicity, and the preservation of the tangent vector under parallel transport. The first derivative with respect to affine time at a point on the null geodesic lets us define a 4-momentum so we can use the Planck-Einstein relation E = pc = hf = hν = ħω relating the frequencies and wavelengths of photons, and how they redshift and dilate from point to point. (This is especially handy in curved spacetimes, like the expanding one in cosmology or the collapsing one around black holes).
- --
[1] An image may help: drop two dimensions from 3+1 spacetime to give us 2-space we get a tangent plane instead of a tangent volume at each point along a geodesic on a 2-sphere (which meridians on Earth's surface approximate) <https://en.wikipedia.org/wiki/Local_tangent_plane_coordinate...> -- sliding the tangent plane south along the meridian in uniform motion is like advancing the proper time.
How does this compare?
Edit: yeah this one: https://web.archive.org/web/20010604001305/http://www.anu.ed...
Since they probably all rotate in nature.
> But wouldn't we want to see the black hole? One could send a ray through every pixel of a screen, and let them go around the black hole and hit its surroundings. And if the rays are sent back in time, it's as if one received the light emitted by the surrounding objects in the past!