Black Hole Vision simulates the gravitational lensing effects of a black hole and applies these effects to the video feeds from an iPhone's cameras. The application implements the lensing equations derived from general relativity (see https://arxiv.org/abs/1910.12881 if you are interested in the details) to create a physically accurate effect.
The app can either put a black hole in front of the main camera to show your environment as lensed by a black hole, or it can be used in "selfie" mode with the black hole in front of the front-facing camera to show you a lensed version of yourself.
Next, you can select the "Kerr black hole" mode, which adds rotation (spin) to the black hole. Additionally, you can augment the rotational speed of the black hole (its spin, labeled "a" and given as a percentage of the maximal spin).
When the user selects the "Static black hole" mode, this texture is computed on the GPU and cached. The "Kerr black hole" textures, however, have been precomputed in Mathematica, due to the need for double precision floating point math, which is not natively available in Apple's Metal shading language.
The source code, including the Mathematica notebook, can be found here https://github.com/graveltr/BlackHoleVision.
It looks like nothing actually disappears. I expected a black hole to not just affect what an area looked like, but also to “disappear” some part of what was there.
If you happen to approach the event horizon closely and come back again far away to where you started, you will see that a lot of time passed at your origin, while by your clock, the trip might have been short.
I say that because there's an idea to play with for a v1.1 that would give it staying power for me:
Do you have enough processing power on an iPhone to combine this with Augmented Reality? That is to say: can you explore "pinning" a singularity in a fixed region of space so I can essentially walk around it using the phone?
Assuming that's possible, you could continue evolving this into a very modest revenue generating app (like 2 bucks per year, see where it goes?) by allowing for people to pin singularities, neutron stars, etc. around their world and selectively sharing those with others who pass by. I'd have fun seeing someone else's pinned singularity next to the Washington monument, for instance. Or generally being able to play with gravity effects on light via AR.
The geosharing augmented reality thing mentioned by the parent comment is very very cool too, I'd pay a few bucks for that! Maybe make it social by letting black holes that people drop somewhere IRL merge, etc...
Reach out to me if you eventually would like to spin up a cheap bit of infrastructure to host the data of where people dropped their black holes, and need some help with that!
Example: Set mass of black hole to 1e12 metric tons, or about 100,000 great pyramids.
This has a schwarzschild radius of 1485 femtometers (1 femtometer is around size of a proton).
Nominal luminosity is 356 watts. You could power your computer! Lifetime is 1e12 gigayears.
An interesting thing comes with gravity. Gravity at the schwarzschild radius for this mass is 3e28 m/s^2, but this is at a smaller-than-an-atom radius.
If you put your hand within a foot of it, gravity would be 700,000 m/s^2.
You would need to be at a distance of 270ft to experience gravity from it that compares to earth (9.8 m/s^2).
Really cool app btw!
I have once seen a video of Kip Thorne, explaining that the black hole visual effects of Interstellar were an actual physical simulation. I wouldn't have thought, that it was feasible to run on an iPhone.
Honestly it's not so far-fetched (to me) that in a few years someone will have GRRMHD simulations running in real time on a portable device.
Are you familiar with A Slower Speed of Light? It's a game which has some nice special-relativistic effects.
Thanks for pointing that out.
TLDR: redshift depends not only on the position of the source, but also its velocity.
In the meantime, check out this code developed by Dominic Chang (grad student at Harvard) that implements lensing by a non-rotating (Schwarzschild) black hole in your browser: https://dominic-chang.com/bhi-filter/
Quick edit- I did exactly that and now it works fine. First boot up before seemed like it got stuck when asking for permission to use the camera.
I’m no astrophysicist but it all looks doable with the camera API, canvas API, and WebGL or WebGPU shaders. That actually sounds like a lot of fun.
Still, kinda fun, reminds me of playing around with different blur / liquidify filters in photoshop back in the day.
2. Neutron stars I think
Thanks for the question!
In the meantime, check out this code developed by Dominic Chang (grad student at Harvard) that implements lensing by a non-rotating (Schwarzschild) black hole in your browser: https://dominic-chang.com/bhi-filter/
> The developer does not collect any data from this app.
Well, duuh, nothing can escape the black hole, not even information!