12

I'd like to simulate the magnification of very distant objects by the lensing effect of a less distant galaxy. Will I need to model large numbers of point masses or can I get away with just a single average point mass?

I can see how to raytrace using hyperbolae for the rays influenced by a single point mass, but I wouldn't know where to begin with multiple point masses. So before I attempt to build this raytracer I'd like to know whether I'm going to be able to avoid multiple masses, and still have believable results.

1 Answers1

10

As you have probably observed, in general, you cannot solve in closed-form the equations for ray trajectories around multiple distorting objects.

The standard approach for such things is just to discretize it. This looks like Eulerian integration. Just step your ray a little bit toward the object, calculate gravity from all sources and bend it, then step it more, und so weiter. This is called raymarching.

Since you're interested in problems on an astrophysical scale, you can assume the ray is linear far enough away from the object, with minimal error.


Here's a scene I rendered a while ago using a homebrew photonmapper (no QMC) using this raymarching technique.

I present: relativistic photon mapping: black hole in a Cornell box! black hole in a Cornell box

geometrian
  • 1,980
  • 13
  • 26