Hacker Newsnew | past | comments | ask | show | jobs | submit | aplavin's commentslogin

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


The vast majority of scientific images, be it in papers on press releases, are using an arbitrarily-chosen colormap to map whatever numeric values are there to actual visible pixels. For the Event Horizon Telescope speficially – it is a radio telescope, so what it sees has no intrinsic "color" as perceived by a human eye at all. Same with this simulation here.

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


Aha! understood

Yeah I couldnt work out what they were in relation too


That would be fun indeed! Not sure I would literally want to put this into my room though.

You mean, without a camera and a screen, out of pure physical objects? You can actually reproduce gravitational light bending quite accurately with a properly-shaped lens (some wine glasses are surprisingly close!), see eg https://www.youtube.com/watch?v=PviYbX7cUUg for a classical wine glass experiment, or https://sites.google.com/view/jeansurdej/gravitational-lense... for purpose-made lenses. It only reproduces the so-called "weak field" bending, not light that makes half a turn (coming from behind you) or more.

Could you please share a screenshot so that I investigate what actually happens? I tested on a few different devices, but far from anything extensive.

This is on Chrome/Win11:

https://snipboard.io/W8SXYm.jpg


Hmmm I think I see what's happening here. Basically, all devices I tested (laptops/phones/tablets) seem to have small pixel size, and to save on compute power for weaker devices I decided to render with half as many pixels as the screen has, letting the browser upscale the result. In your case, pixels are probably quite a bit larger, and half-res rendering has these prominent artifacts.

Can you try if increasing "render scale" in params->display helps?


Hmm, interesting! I saw that it's a draft, and didn't investigate further. Maybe it does work indeed on some browsers.

Generally, the compatibility story turned out more fragmented than I expected. Eg, on my phone, Chrome can do AR – but cannot do two camera feeds at once; while Firefox is the exact opposite – no AR but can do both cameras at once, so that you see both front and rear lensed around the black hole properly (in the camera mode).


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.

Sure, see https://blackhole.plav.in/ar_example.mp4 for an example. Should work on most Android phones, even old ones (mine is 7 years), the Chrome browser is generally best for AR.

Interestingly, Firefox seems to be better for the camera mode – for me, Chrome only gives one camera feed at a time, while Firefox allows both front & rear cameras.

And AR + camera warping don't work together, unfortunately – browser API limitations.


Okay either I'm stupid or not seeing the "relativistic effects".

This looks the same as on my device.

I was expecting some distortion or bending of the background?


> AR + camera warping don't work together, unfortunately – browser API limitations.

So, you either choose AR and see the simulated emission from around the black hole, properly warped/boosted – but the camera feed remains flat, the browser itself does the overlaying.

Or, alternatively, choose the camera mode, and see the warping of your camera feed.

Not both at once!


Eagerly awaiting WebGravity API support to control your device's builtin gravity field generator!

Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: