Ray tracer with a black hole
A physically based ray tracer, extended with a realistic black hole that bends light.
made for the course advanced computer graphics

During the semester the renderer grew into a full path tracer: materials, textures, environment maps, multiple importance sampling, and differentiable rendering.
For the final project, “Black holes in Nori”, rays no longer travel in straight lines. I wrote two solvers for the bent path: one with Newton’s gravity, and one from the Schwarzschild equations (the real solution of general relativity around a black hole), each checked against hand-computed cases. For a black hole sitting in the scene, the integrator switches to stepping each ray through space with Runge-Kutta (RK4) once it enters a sphere of influence, and goes back to the usual fast path tracing outside it. The photon sphere and the Einstein ring show up on their own, as they should.
Around it: an environment map for the starry sky, texture mapping, and a scene built in Blender. The papers on the desk are the equations the image was made with.