Re:Show HN: Rendering black holes with Haskell
by vc98mvco on Saturday March 12, 2016 @01:19PM
(#11273832)
Any suggestions to fake the appearance? Think of distorting background images, for 2d video game purposes. And it doesn't have to be very accurate, just a general resemblance.
[ Parent
| on HN ]
Re:Show HN: Rendering black holes with Haskell
by flannelhead on Saturday March 12, 2016 @04:49PM
(#11274756)
At least there's a simple equation [0] for the deflection of light rays caused by a black hole. If your background is a UV map (for example), then it should be easy to compute the distortion effect. rantonels (whose raytracer was the source of inspiration for mine) has done a realtime version [1] -- I believe this should be close to what you're talking about.
[0] https://en.wikipedia.org/wiki/Gravitational_lens#Explanation... [1] http://spiro.fisica.unipd.it/~antonell/schwarzschild/