The picture is the equatorial plane of a Schwarzschild black hole, in geometric units where G = c = 1. Parallel rays come in from the left. The black disk is the horizon at r = 2M. The ring just outside it is the photon sphere, r = 3M, where a light ray can orbit and will not stay there: the orbit is unstable.
$$ \left(\frac{dr}{d\lambda}\right)^2 = E^2 - \frac{L^2}{r^2}\left(1 - \frac{2M}{r}\right) $$
Each ray is a null geodesic. The state is radius, azimuth, and radial momentum, with energy E = 1 and angular momentum L equal to the impact parameter. I integrate that first-order system with the classical fourth-order Runge-Kutta method, on an adaptive affine step, and stop a ray when it crosses the horizon or climbs back out. The paths are computed once, when you move a slider. The frame only slides a bright point along each path, which is why a phone can keep the picture moving.
The critical impact parameter is b = 3√3 M, about 5.196M. The dashed lines mark it. Rays inside that cone fall in. That bundle is the shadow: a distant observer never gets those photons back. Rays outside it bend, which is the lensing, and escape. Far from the hole the bend settles toward the weak-field deflection 4M/b.
Drag the beam wider and you see more of the rays that barely notice the mass. Narrow it and the shadow fills the frame. Zoom is only a camera. The mass stays 1.
Field note: Light around a black hole. Draft for Ali to write. It is not published yet.