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 2 of 36

20k10 replies#
If anyone's interested in the accuracy, this is very 'visualisation grade' software. Its a bit of a pet peeve of mine that people present these sims as being very physically accurate, when they contain major inaccuracies, some of which are very obvious and/or deliberate. This one has some serious physical limitations

I wouldn't mind at all if it didn't say that this was a *physically accurate* black hole specifically, but this now falls under misleading science communication in a way that often gets hand waved away as if it doesn't matter, so we've got to clear some things up!
1. The accretion disk shouldn't be red, people just expect it because it looks cool. Black hole accretion disks are near universally hot enough to be blue. Interstellar did this too, and tried to handwave it away very unconvincingly
2. This is a non/low (?) spin black hole, which isn't super duper realistic
3. It ignores the position of the camera (which affects the lorentz shifting)
4. The doppler shifting isn't terribly accurate
5. It doesn't model the accretion disk temperature distribution or colour with any kind of accuracy. Usually you model accretion disks as a blackbody radiator, shift it by the doppler, and to display this convolve this against the human eye response (LMS), go to XYZ, then RGB, do a physical tonemapping step, before an sRGB conversion. This instead does none of that - no step of this is done with any physical accuracy. Its not even illustratively correct as we'll get into
6. The actual radiative transfer is very simplified compared to what you'd use for realsies, and isn't based on any real numbers, with very simplified equations. The opacity and emissivity of the disk is arbitrary, as is the size, and it does not correctly incorporate brightness or extinction, eg here https://github.com/aplavin/blackhole.plav.in/blob/2f004bfeca... is super simplified
7. The wrong equation is used for the doppler calculation. They use the I^3 variant, whereas the data you get out of a disk sample is *radiant flux* which is actually F_obs = F_emit / (z+1)^4. This is a very common mistake in image processing, which means that the doppler shift and observer brightness isn't correct. Surface brightness over here https://github.com/aplavin/blackhole.plav.in/blob/2f004bfeca... is *not* a spectral radiance but instead a radiant flux
Stuff like the brightness -> colouring conversion is particularly inaccurate. Eg if you check out the source:
https://github.com/aplavin/blackhole.plav.in/blob/2f004bfeca...
It maps the pseudo brightness completely arbitrarily to colour. The resulting colour/brightness here then doesn't correspond to anything remotely physical. It also performs a *linear* mapping of a linear quantity (brightness) to sRGB (which is a nonlinear process!!), which means that it doesn't even retain any of the underlying physical characteristics of the brightness simulation, which itself is quite inaccurate. Its vibes all the way down
This is all fine if you're doing visualisation, but this isn't an accurate simulation. I wish this was just called a visualisation of a black hole, but its being communicated as if this is super hard science with credentials and all

aplavin3 replies#
Some are fair – of course this is a simplified visualization! Observationally, we don't really know how fast a given black hole is rotating, and here I indeed assumed a non-rotating one. It's not an inaccuracy per se, more like a missing feature. The camera mode has a (half-hidden) toggle to enable Kerr metric and set spin, but even there it's not a default.

I consider the colormap choice to be completely arbitrary though, without affecting accuracy. Basically, it represents intensity at a given frequency, the image like one would get from a telescope. It wasn't intended as a faithful optical color representation! And really, in my (admittedly biased) view of a radio astronomer, I tend to assume frequencies invisible to the human eye anyway.

20k1 reply#
>of course this is a simplified visualization

Its titled a "physically accurate black hole"! Please don't do this, if its intentionally not physically accurate and heavily simplified! The general public on here don't know better, and it takes someone else with years of experience simulating black holes to dig through your code to show what you've simplified. There's like a few hundred people who have the right experience worldwide to know that you've got some of your equations incorrect
The issue is when you're communicating doppler, if you want to correctly show the change in doppler, you can't make the intensity or colour mapping arbitrary
There's two ways to communicate accurately an example linear change in emissive power:
1. Use a perceptual brightness system, so that a linear change in power represents a linear perceptual change in perceived brightness. This accurately communicates to a viewer the underlying shift in power emission, if you want to show off how a radio telescope perceives a black hole for example
2. Use an emitted power <-> sRGB mapping (with tonemapping), so that a linear change in power is perceived as if it were a physical light getting brighter. This is more "what would this look like to a person?"
At the moment the change in your image brightness doesn't correspond to anything, which means that its not really communicating any science, and it doesn't correspond to doppler. Which is fine if its just illustrative and that's clear, but again vanishingly few people will know this is a visualisation not a physically accurate render

aplavin4 replies#
> Its titled a "physically accurate black hole"! Please don't do this, if its intentionally not physically accurate and heavily simplified!

It also doesn't exert the gravity an actually accurate black hole should :) And also, even on a phone with two cameras, they only cover a part of sphere – while a real black hole would bend light coming from all 4pi directions. Some simplification is generally required ("the map is not the territory") and I don't see "simplified" as being opposite to "accurate".
Colormap choice: it can be a useful mode to show proper linear power -> linear perceived brightness mapping – true! But that's only one of many possible choices, and scales like logarithmic are very common in scientific images.

20k#
>I don't see "simplified" as being opposite to "accurate".

Are black hole accretion disks generally red in real astrophysical cases?
They're most accurately represented as being blue. Red is fine for visualisations because it looks cool (which is fine!), but blue is the physically accurate colour. Visualisations claiming to be accurate like this presenting red black holes is becoming an increasingly large science communication problem
The way that the colour and brightness are mapped together is also not correlated correctly, and some of the equations just aren't right. The doppler isn't correct at all here, partly because its simulated incorrectly (with the camera problems), and partly because the mapping done at the end doesn't correlate to any reasonable brightness
Stuff like this: Its not accurate at all. It isn't simplified, its just wrong - which is totally fine for a visualisation, if that's the intent. But:
>scales like logarithmic are very common in scientific images.
Sure. What scale are you using for the doppler brightness here? Because as far as I can tell, its a piecewise mapping of the form ~pow(x, 2.2), after being run through a non smooth function `afmhot` - a function which doesn't have a linear brightness response. So the brightness in this image doesn't really correspond to anything related to doppler or brightness, and the colour also doesn't correspond to anything involving colour (or the doppler). The entire image's look is basically accidental
Here's a specific comment from the event horizon telescope talking about exactly this problem with specifically the afmhot transform being used, because its important for visualisation:
https://github.com/achael/eht-imaging/issues/85
Which shows some of the problems here

EugeneOZ1 reply#
“Physically accurate” indeed raises the bar significantly.

You’ve already done great work here. That said, the feedback seems to come from someone who spent considerable time analyzing your work. Even if only a few of the suggestions are ultimately valuable, that’s still a meaningful contribution and worth considering.

Continue this thread — 1 reply

7bit6 replies#
Always funny when people claim that scientific term apply to their software and then disregard any founded criticism in a non scientific way.

Continue this thread — 6 replies

stackghost1 reply#
>I don't see "simplified" as being opposite to "accurate".

Is it accurate to model a cow as a sphere?

aplavin1 reply#
To describe cow's gravity? Pretty much so. Then, for visualization and even for many biological purposes, it's accurate enough to mode the cow as a bunch of organs with known processes happening in them. But that's still far from atoms and quarks that constitute the cow.
stackghost#
For an object with the mass of a cow, the gravitational effects are minute, and thus if we study small gravitational interactions we would surely want to model the distribution of mass of the cow.

Either way, no layperson (to whom this black hole sim is targeted) would consider a simplified spherical cow to be accurate. That's why the spherical cow is a meme.
Perhaps you're getting the pushback you're getting, because you have a different idea of what accuracy in physical simulations means.

yoaviram1 reply#
Great job. Please consider turning on rotation by default (for those who missed it, it's in the parameters). The overwhelming majority of astrophysical black holes are expected to be spinning (Ker) black holes.
aplavin#
That option for rotating (Kerr) black holes generally works, but not on all devices in my experiences. Debugging on someone's phone is not that straightword, so I went with the most accessible experience by default.

Also note that the visual difference for the camera warp is really marginal between rotating vs non-rotating black holes.

gilrain1 reply#
> completely arbitrary

You agree that it isn’t “physically accurate”, then… but seem to argue that you shouldn’t be called out for the false title?
It’s fair enough to be called clickbait when you really did score extra clicks with a slick falsehood, surely?

aplavin4 replies#
Arguing about colormap choice seems very strange to be – this is such a common practice in astronomy (and other fields!). The vast majority of images you see in published papers apply some arbitrarily-chosen colormap and color scheme. No matter if you look at observational or theory papers, it's very rare to find a real true-color image. And for a bunch of good reasons!

The only difference here is that I don't show a colorbar with explicit color-number mapping, for simplicity sake.

Continue this thread — 4 replies

KaiserPro3 replies#
I clicked on this because I worked on the infra that simulated the famous blackhole sim in interstella.

I thought "oooh this is interesting I wonder how they are going to do physically accurate on an end device" Recalling how the original particle sim was something like 100TB, took 2 weeks to generate and seemed to write in a way that killed disks. but that was >10 years ago, so what clever stuff has been done to model it locally.
Its been a long time since I've looked at black holes, but what I'm not understanding is why the stars surrounding the black hole are just points, and more over why the lines are straight to the centre of the hole. from memory the way light enters the hole appears non-linear and changes on view point.

vee-kay1 reply#
Someone refers to a sci-fi-esque (more imaginative than scientifically accurate) virtual rendition of an interesting scientific phenomenon (black hole) in a fanous sci-fi movie (Interstellar), in their scientific analysis/critique comment on a HN thread about the virtual sci-fi-esque rentition of such a sci-fi object (black hole)(yes, a simplified easy-on-eyes pseudo-accurate rendition of a black hole, for VR/AR immersion at home, counts as sci-fi-esque, IMHO), and someone else who worked on such famous object (black hole) depicted in that exact sci-fi movie, responds to the comment.

Peak HN, right here!

reactordev#
You have reached the end of the internet. We hope you enjoyed your stay. /s
aplavin1 reply#
> why the stars surrounding the black hole are just points, and more over why the lines are straight to the centre of the hole

Sorry for confusion! Points + lines are just other users looking at the black hole right now, their camera locations and lines of sight. Nothing more! In the first hours of HN frontpage, there were a lot – and I can see how one can understand them as parts of actual scene :)
I decided not to change their style, not to make them more subtle – half a day later, there are already way fewer users online, and these points/lines don't look as crowded as they did.

KaiserPro#
Aha! understood

Yeah I couldnt work out what they were in relation too

aplavin#
> I thought "oooh this is interesting I wonder how they are going to do physically accurate on an end device" Recalling how the original particle sim was something like 100TB, took 2 weeks to generate and seemed to write in a way that killed disks. but that was >10 years ago, so what clever stuff has been done to model it locally.

Yes, totally reasonable question! Those terabytes surely were things like fluid/matter motion around the black hole, stuff like this.
Here, I definitely don't simulate matter motion around the black hole as a particle/fluid sim does – instead, I focus on simulating the effects of the black hole itself. Matter distribution and motion (where it is used at all, ie not in camera mode) is described by simple functions phenomenologically.
The single most notable effect of a black hole is strong light bending (+ time delays), and it is properly simulated in all modes in this app. Next, relativistic beaming (Doppler boosting) and gravitational redshift are simulated for the accretion disk emission as well. If you zoom out, the jet is visible as well – it's relatively far away, so it is rendered with special relativity only; ie, no GR, but full volumetric rendering taking all SR effects into account. Admittedly, the GR-SR seam implementation can be improved somewhat.

gattr1 reply#
On a related note, there's an annoying mistake in one of the Fatalities in "Mortal Kombat 1": Liu Kang teleports with his opponent into outer space, summons a black hole with a snap of his fingers, and throws the poor sod in. But the accretion disc is red where it rotates towards camera, and blue where it rotates away!
JadeNB#
Boy, I really hope somebody got fired for that blunder.
biorach2 replies#
I think you're being very harsh. I read it as a side project of a scientist meant to entertain as much as educate. Holding it to the same standards as the Event Horizon project seems pedantic and excessive.
gilrain#
The person you’re replying to did not hold it to that standard — they only pointed out that the standard it claimed to hold itself to was not actual.

If correcting misinformation is “harsh”, reality is fucked.

20k#
All they need to do is not put the label physically accurate on it then. If you call something physically accurate and decorate it with your credentials as a harvard phd in astrophysics building radiative transfer sims, people expect it to have a degree of accuracy. This sim, from a physical perspective, is wrong

That's 100% fine if you present it as a visualisation with limitations and I absolutely love people making fun side projects like this and presenting them. I built a whole tutorial series on doing this, because I think people getting stuck into the field is absolutely great, and more power to everyone who wants to write anything no matter how accurate it is
Its the fact that this is being presented and stated as if its a physically accurate sim made by someone with experience in the field so it must be spot on, when in reality its little better than an artists impression of a black hole, that bothers me. Its science miscommunication. Coming away from this, you might think:
1. Black hole accretion disks are red
2. Black holes do not warp the background around them, only the accretion disk
3. You might get notions about the intensity distribution of the doppler shift, or the way that cameras work near black holes etc
None of which is particularly correct, and there's a lot more wrong with it too

mazurnification2 replies#
at 1 - is it red due to red shifting due to gravity?
aplavin#
It's purely my color map choice – the underlying simulated image is simply a number at each pixel. Transforming that number to the actual displayed color is generally an arbitrary choice, as common for the vast majority of images in astronomy/astrophysics papers. The only difference is that I don't show a numeric colorbar here, for the sake of simplicity.
20k#
They're blue, in general black hole accretion disks are very hot, and anything past a certain temperature looks pale blue as follows:

https://20k.github.io/assets/kerraccrete.PNG
This is a colour and relative brightness accurate example of a hot accretion disk. The size, emissivity and absorption are set to arbitrary parameters, but this is human-eye-colour accurate with correct doppler and radiative transfer for a spinning black hole. Its as correct as I can make a specific model, for what a human would see standing next to a black hole taking into account the limitations of the human visual system
You can get a red accretion disk like this:
https://i.postimg.cc/pV8VWKhw/verycold.png
But it requires the disk to be extremely cold, which is physically pretty suspect
One interesting feature is that the temperature and brightness scale differently, so that its actually hard to observe the colour shift, as the brightness changes much faster than the colour. So its not something you ever really see to the human eye
That said these don't do accretion disk within the ISCO, which is a major limitation

FrustratedMonky1 reply#
"an astrophysicist at Harvard's Black Hole Initiative"

He probably knows. It's in a browser, there are probably some trade-offs. Calm down.

gilrain4 replies#
Keep your need for simplified representations of reality (which claim to be complete) out of our information-based community.

Continue this thread — 4 replies

Continue this thread — 3 more replies