Easy. Take the Schwarzschild metric, find the Christoffel symbols, find their derivative, write down the geodesic equation, change to some cartesian coordinates to avoid endless suffering, get an immense multiline ODE, integrate. That's pretty much it.
The TV and books I consumed as a kid made it seem plausible that people in the future will regularly talk like that.
Now, living in the future, I'm happy that it turned out to be true.
I like the way you raytrace the entire image at once. Clever, but you might be able to make it faster...
Right now you process the entire image in one hit. However a 1080p * 4 byte image is 777,600 bytes - from a quick read I believe you have several of these. They're large enough to blow the caches in your CPU.
It might be much faster to break the image into 8,16 or 32 square or rectangular or line shaped "patches" and process each in sequence. That would help you hit the same parts of your working arrays more often and keep them in cache between iterations.
I'm thinking
for patch in patches
for iter in iterations <-- currently your outer rendering loop
Might be a quick performance win worth playing with.
Hit me up at tom at gridspy (.co.nz) if you want to discuss further.
This is really cool! It's a nice explanation of the topic (including some very effective diagrams), and the resulting visualizations are great.
[Side note: In discussing the distortion of the event horizon, the author says "I suspect the punctured sphere → disk map is conformal/biholomorphic". There is a conformal map between the punctured sphere and the plane[0], but there is no conformal bijective map between the open unit disk and the full plane.[1] Thus, the punctured sphere and the unit disk cannot be conformally equivalent.]
The image "inversion" effect you get near the black hole is very intriguing ... you get an infinite series of inversions with increasing compression corresponding to the number of revolutions light took around the BH. So a few photons getting to you might be really old (could be almost as old as the BH itself!), it's a series of windows into the past...
If you look at the image of geodesics he shows an example of an almost 360 degree trajectory. Simple continuity arguments allow you to conclude you can have an arbitrary number of rotations, I believe.
I would conjecture the contraction is roughly exponential, there's no obvious contradiction with that but it's way over by knowledge to check it ...
By the time a photon has done a complete rotation, it necessarily has to be on a path that takes it into the black hole (instead of outside of it). So yes, you can have an arbitrary number of rotations, but anything that makes a complete rotation or more will never leave the black hole.
It turns out that a photon can describe any real rotation angle around a black hole (I've asked a physicist). The continuity argument I gave is valid: take the critical energy E wherein the photon is attached to the photosphere, then with an adequate E+eps, eps > 0, the photon will describe an according monotonically decreasing angle.
What I'd really like to see is how this would differ for a Kerr metric[1], since it's assumed that most stellar or galactic core black holes will be rotating.
[1] https://en.wikipedia.org/wiki/Kerr_metric
I haven't watched that movie, but I did look at screenshots, and what I see is the bog standard black hole used by everyone everywhere. And I'm not really surprised - after all, Interstellar invented the black hole image this article was talking about, AFAIR it was for this movie that such rendering was attempted the first time ever - so for your reference to be relevant to my comment, we'd have to be dealing with some really serious time travel stuff. ;).
Exactly! I wouldn't be too surprised if they do… it looks doable.
Although you might not want to get your ship too close to one with an accretion disk - it'll burn up. (If you do, at least use an all-black paint-job and look stylish.)
It was a quick hack to explore the idea, and I'm pretty sure important details aren't right, but it was good enough for going on with. While doing it I remember thinking, "I wish I had time to explore this whole process properly." Now I don't have to!
What if "what we see" is not accurate of how it actually looks and works? I think the math behind it would have a more accurate way to describe how it looks and works, which is what the render does.
Well it depends on the viewing distance of course. With a telescope you can only (barely) image the accretion disk, if the BH is not too far and not shrouded by dust. So it's more of an artistic perspective, but accurate rendition :)
Nice introduction. My colleague works exclusively in raytracing around black holes (although he uses the Kerr metric) and he has produced some really cool images.
I highly recommend looking at the literature for really cool images with more complicated black holes.
The TV and books I consumed as a kid made it seem plausible that people in the future will regularly talk like that.
Now, living in the future, I'm happy that it turned out to be true.