Lurker News
We have a black hole at home — with actual relativistic physics, live in your browser.

I'm Sasha (Alexander) Plavin, an astrophysicist at Harvard's Black Hole Initiative studying quasars and black hole environments. I work with raytracing/radiative transfer simulations professionally, and wanted to make one anyone can play with — so I built this app.
Put the black hole onto your screen (any browser), or directly into your room with AR or VR (requires WebXR, for example Chrome on Android, or any VR headset). When looking around, pay attention to unintuitive relativistic effects: rays bending around the black hole, and special relativistic "Doppler boosting" changing brightness depending on the viewing angle — zoom out to see the fast jet where the latter effect is especially pronounced. Faint markers show where other viewers are standing right now.
Alternatively, put the black hole in front of your camera and watch it lens your actual surroundings. Light winds around the hole, so you see both what's in front of you and what's behind you at once (when the device and browser allow both camera feeds). The closer to the black hole, the stronger the bending — and the longer the light-travel delay: wave at it and watch the changes propagate inward. (unfortunately, WebXR restrictions make AR passthrough and the camera feed mutually exclusive)
No signup, basic features work on every device, no data uploaded — the camera feed never leaves your device. Source code: https://github.com/aplavin/blackhole.plav.in.
Enjoy having a black hole in your room, or use it for education/outreach — any questions, feedback, or suggestions are welcome!

Comments (193) 36 threads

Show all comments

Showing thread 5 of 36

csmoak2 replies#
Please correct me if I'm wrong, but it feels like the leading edge of the accretion disk (coming towards the viewer) should be significantly brighter than it is shown here, and the trailing edge (going away from) should be significantly dimmer?

Or could the brightness shown be a result of it being Kerr vs Schwarzschild?

aplavin1 reply#
One side of the accretion disk is indeed brighter than the other – in the default view in the app, the bottom part is brighter. The effect appears quite clearly visible to me, although the exact contrast depends on the colorscale mapping. Here, I tried to find a colorscale that works well for both the disk and the jet, which naturally means the leading/trailing edge contrast can be less than in the linear mapping. Hope it explains the visual effect!

Kerr vs Schwarzschild (static vs rotating black holes) is a much smaller effect visually – that's why it is so hard for us to measure black hole spins (= how fast they are rotating) observationally, even with the Event Horizon Telescope.

csmoak1 reply#
I think the contrast between the two sides is typically greater with an optically thick disk, and it looks like you are rendering an optically thin disk. I think that's the main difference from what I was expecting when I saw it.

Very cool demo! Thanks for sharing!
(For reference, my experience rendering black holes is recreating Luminet's rendering from the late 70s: https://www.ioccc.org/2025/cesmoak/index.html )

aplavin4 replies#
True, the disk is rendered optically (and geometrically) thin. This is done so that real-time performance is attained on devices like phones – volumetric GR rendering would be significantly more expensive. The jet (zoom out to see it) is rendered with full volumetric effects, because it's just special relativity there.

Fortran punchcard style to render black holes?! That's really going full circle to the origins, I really enjoyed reading about Luminet's work some time ago.

Continue this thread — 4 replies

20k1 reply#
Yeah the doppler in this picture is all wrong unfortunately, the underlying equation used isn't right here (they mixed up spectral radiance and radiant flux). The rendering is also done without taking into account sRGB, and its run through a function that messes with the brightness - so the brightness is really incorrect. Plus all the colours are wrong (it uses an amhot colouring function, they aren't based on anything), and the extinction and emissivity isn't correct either, and the camera basis is also set up wrong so it also has the wrong perspective too. Other than that its all good
aplavin1 reply#
Colormap/colorscale is generally considered an arbitrary choice in scientific plots or visualizations. Linear mapping of simulated emission brightness -> screen brightness could be a reasonable alternative mode, I agree – but it's weird to say that colormap choice makes it not accurate.
20k1 reply#
What exactly is physically accurate here though? Because its not:

1. The relative brightness of different parts of the image
2. The colouring
3. The general relativistic effects of a black hole, other than the most basic disk warping effect
4. The relative colouring or brightness change from doppler
When you make a post about a physically accurate rendering, people usually expect it to be a decent representation of the underlying object in *some* capacity
There are of course constraints in terms of what the human eye can see and what we can portray - eg wanting to present alternative radio frequencies, highlighting different aspects of a black hole etc, which is why we make *specific* brightness and colouring map choices. That isn't a justification for making *arbitrary* choices in brightness and colouring map choices, because otherwise you could do sin(brightness * 1000) and call it physically accurate. In fact any output is an arbitrary colourmapping of a physically accurate black hole rasterisation under this definition, including a pure white square
Colour mapping and scale absolutely is very very much not an arbitrary choice, I linked elsewhere the event horizon telescope talking about this specific issue. People go to great lengths to put the work in to make physically accurate renderings, to convey accurately what you're looking at. I'm surprised to see you say that its considered arbitrary for renderings
There's a lot of room for doing visualisations to show off a specific element of a black hole, but the output here is near completely free of any physically accurate content. This is one of the more basic simulations I've seen - and that's before getting into the fact that it contains coding errors

aplavin1 reply#
> What exactly is physically accurate here though?

I'll assume this is a good faith question, hope it was intended like one. I view strong light bending as the key distinguishing property of a black hole, and something we are fairly certain about. This is reproduced accurately in all modes, up to the fundamental technical constraints of the browser environment. Gravitational redshift is another one, and it's also reflected.
Things like the precise matter configuration in the disk (and correspondingly its radial brightness profile) are much less well known, and are less fundamental for black holes as objects. This part is represented in a simplified way – thin disk, with a reasonable-shape analytic function defining radial emissivity distribution.
As for colormapping: I follow the by-far-dominant approach in scientific literature, where color mapping choice is completely unrelated to physical accuracy of the plotted observations or simulations. Having a preference for different color schemes is a matter of taste; suggesting a linear intensity->pixel mapping is a reasonable feature request, but far from a bug or inaccuracy.

20k1 reply#
So in your opinion, the primary thing that makes this a physically accurate simulation is that you've calculated the bending of light rays, and the structure, colouration and brightness of the accretion disk doesn't matter at all?

>As for colormapping: I follow the by-far-dominant approach in scientific literature, where color mapping choice is completely unrelated to physical accuracy of the plotted observations or simulations. Having a preference for different color schemes is a matter of taste; suggesting a linear intensity->pixel mapping is a reasonable feature request, but far from a bug or inaccuracy.
It is not true at all that this is the dominant approach in the literature, the event horizon telescope does not use this approach in their papers. I linked a comment from them elsewhere about this in a github PR
Specifically:
https://github.com/achael/eht-imaging/issues/85
>Unfortunately, vanilla afmhot does remain the current default in the eht-imaging library for historical reasons, but this could change soon. *Rest assured we thought of this issue and the paper images are indeed perceptually uniform!*
I would welcome an attempt for you to create a scale, that maps the output pixel brightness to the underlying physical luminance, which I think would show why the mapping is such a problem here from an accuracy perspective, but you're absolutely not correct that you're following the literature here. People are much more careful about presenting accurate data, and your approach would result in a correction being put out

aplavin1 reply#
>> I follow the by-far-dominant approach in scientific literature, where color mapping choice is completely unrelated to physical accuracy of the plotted observations or simulations.

> It is not true at all that this is the dominant approach in the literature
Just to clarify: you are saying that there are not a lot of images in literature rendered with a non-perceptually-uniform colormap (eg, any matplotlib colormap aside from the 5 uniform ones)? Or that there is only one correct way to choose colormap for a given image?

20k#
I'm saying that for black hole visualisation, the approach you're using is not necessarily standard in comparable papers. It would not be considered a physically accurate rendering no. People go to great pains to ensure that they're using the correct colour spaces and colour mappings to convey what they intend to convey, eg see the event horizon telescope papers which use perceptually uniform graphs

There is more than one choice as explained previously, it depends on what information you intend to communicate, whereas here the plot doesn't represent anything. I don't want to be rude, but this is plots 101, where the intensity does absolutely matter in your figures at minimum for renderings
I'd very highly recommend trying to create a scale for your work here to observe the problems with the approach in colouring and brightness, to check how it would work if you were to try and take one of these images and publish it in a paper, and compare it against other published intensity plots of black holes. People do make mistakes here, but its usually unintentional and a mixup due to not understanding gamma correction, which does indeed sometimes result in corrections