Live data from Hacker News

Raytracing a Black Hole

rantonels.github.io

11–20 of 40 posts

Re: Raytracing a Black Hole

#12
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.

Re: Raytracing a Black Hole

#13
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.]

[0] http://en.wikipedia.org/wiki/Stereographic_projection [1] http://en.wikipedia.org/wiki/Unit_disk#The_open_unit_disk.2C...

Re: Raytracing a Black Hole

#16
Great work!

> I suspect the punctured sphere → disk map is conformal/biholomorphic, but I have no sources for this

It doesn't look conformal to me, some right angles become acute...

Re: Raytracing a Black Hole

#18
post #17

One thing I can't forget is a picture of a black hole from telescopes. We should really call this an artistic rendition of a black whole, because they look nothing like that. At least not as sexy. I can't find the original but here: https://thetruthbehindthescenes.files.wordpress.com/2011/01/...

Is it fair to compare this low-res photo to the render? I think they'll be prettier once we have better telescopes.

Re: Raytracing a Black Hole

#20
Performance thought:

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 
Might be a quick performance win worth playing with.

Hit me up at tom at gridspy (.co.nz) if you want to discuss further.

Amazing article, thankyou!

Post reply on HN