Neat. I'll probably use it for five minutes, appreciate the math that went into it, and move on. But nevertheless, pretty neat.
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.
You need a full 3D scan of the environment of everything the black hole can "see" from the position you want to put it in, not just the traditional "augmented reality" that sits on top of a current camera feed, because black holes are also essentially 360 degree cameras that from some angle will let you see anything around them. Not impossible, but harder than "just" taking an augmented reality feed.
Commenting to reinforce this idea: I'd love an AR approach where I can pin a black hole with a given radius into my living room, and walk around it!
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!
It would be neat to also get stats about the black hole depending on where you are in relation to it (obviously this breaks physics as a micro black hole would immediately fall into the earth). Everything is based on the hawking radiation calculator: https://www.vttoth.com/CMS/physics-notes/311-hawking-radiati...
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).
That is 356 watts of luminosity from something so small?! Whoa! It says the peak of the radiation has an energy of 41 keV though, so better not look at it directly (:
I tried plugging in some other numbers and, at first confusingly, found that the luminosity goes up at lower masses?! But of course it radiates from it's outer shell, not the entire volume.
Wonderful tool, imagine playing with those parameters in AR
Yes, this is one of the wonderful crazy properties of black holes: they get hotter as they evaporate! (More precisely, the Hawking temperature is inversely proportional to the mass!)
That's an excellent idea! And indeed, part of the reason we started with the iPhone is because we've been thinking from the get-go about an eventual extension to Apple Vision Pro. As I wrote in my other comment, this is part of an outreach effort to get the public (and students) excited about black hole physics, so we will always keep the code free and open source.
Hello! We are Dr. Roman Berens, Prof. Alex Lupsasca, and Trevor Gravely (PhD Candidate) and we are physicists working at Vanderbilt University. We are excited to share Black Hole Vision: https://apps.apple.com/us/app/black-hole-vision/id6737292448.
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.
There are several additional options you can select when using the app. The first lensing option you can select is "Static black hole". In this mode, we simulate a non-rotating (Schwarzschild) black hole. There are two submodes that change the simulated field-of-view (FOV): "Realistic FOV" and "Full FOV". The realistic FOV mode takes into account the finite FOV of the iPhone cameras, leading to a multi-lobed dark patch in the center of the screen. This patch includes both the "black hole shadow" (light rays that end up falling into the black hole) and "blind spots" (directions that lie outside the FOV of both the front-and-rear-facing cameras). The full FOV mode acts as if the cameras have an infinite FOV such that they cover all angles. The result is a single, circular black hole shadow at the center of the screen.
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).
In a nutshell, the app computes a map from texture coordinate to texture coordinate. This map is itself stored as a texture --- to obtain the value of the map on texture coordinates (x,y), one samples the texture at (x,y) and the resulting float4 contains the outputs (x',y') as well as a status code.
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.
We hope you enjoy watching the world with Black Hole Vision and welcome any questions or feedback. If you like the app, please share it with your friends!
The code was written at Vanderbilt University by Trevor Gravely with input from Dr. Roman Berens and Prof. Alex Lupsasca. This project was supported by CAREER award PHY-2340457 and grant AST-2307888 from the National Science Foundation.
License: This app includes a port of the GNU Scientific Library's (GSL) implementation of Jacobi elliptic functions and the elliptic integrals to Metal. It is licensed under the GNU General Public License v3.0 (GPL-3.0). You can view the full license and obtain a copy of the source code at: https://github.com/graveltr/BlackHoleVision.
By any chance, was Andrew Strominger involved in this at all? He gave the Andrew Chamblin Memorial Lecture in Cambridge last month and demoed something that looked similar.
I think what he showed you was likely a version of this that was coded up by Harvard graduate student Dominic Chang:
https://dominic-chang.com/bhi-filter/
It works very well (and in a browser!) but is limited to a non-rotating (Schwarzschild) black hole---we really wanted to include black hole spin (the Kerr case). As we write on the github, talking with Dominic about his implementation was very useful and we are hoping to get a paper explaining both codes out before the end of the year.
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.
I think that’s why this demonstration is interesting. It’s showing how the light can be bent around the black hole. Anything that crosses the event horizon won’t be coming back, but because of the lensing of the light you can “see” behind a black hole.
So if I’m understanding correctly, the black hole is supposed to be between me and what I’m looking at, not in what I’m looking at?
If so, then my question is wouldn’t some light be lost to the black hole? Shouldn’t a substantial portion of the light coming at me from the other side of the black hole disappear into the black hole, making what does lens around dimmer?
Because, for an external observer, time infinitely slows down near the event horizon. In other words, during one hour by the clock of the far-away observer, the time that passes by the clock of the falling observer approaches zero as he approaches the event horizon. So, when you look from the outside, objects get 'frozen' as they approach the event horizon. For the falling observer, nothing special happens at the event horizon, and he just falls through.
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 feel like this app could also be an app clip to make it so that you don’t have to outright install the app to use it: https://developer.apple.com/app-clips/
First thing I wondered is what would happen if I pointed it another screen, with an image like this loaded. I realize that it's not realistic due to the z-axis, and field of view, but it's pretty fun.
Well technically it approaches infinite gravity. It's a gravitational asymptote. But like the other commenter said, no way to know what it actually is in reality, as we only have mathematical concepts that may or may not match reality.
Just tried to check it out. First boot it crashed, killed app and tried again and now it won’t open. I’ll try and reinstall and do over. iPhone 16 Pro, iOS 18.1
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.
Glad it worked on second boot! We used to have some bugs in the elliptic integral implementation that led to the app crashing, but we think we've eliminated those, so hopefully this is just a fluke... Anyone else with this issue?
Glad to hear that! You'll probably also enjoy reading about the Black Hole Explorer (BHEX): a proposed space mission that will take the sharpest images in the history of astronomy and resolve the "photon ring" of orbiting light around a black hole.
https://www.blackholeexplorer.org/
This is awesome. I see that this is GPL and open on GitHub. Thank you for sharing. If you are open to feature requests that I am too lazy and stupid to accomplish on my own, I would appreciate the option to drop the multi camera view and the option to capture a photo.
Also plus one to the idea of being able to pin the black hold to a specific orientation so you can see what it looks like to pan around an object adjacent to the black hole.
Adding options to drop the multi-camera view and to capture a screenshot is relatively straightforward, and I think we can implement that in the next update. Pinning the black hole to a specific place is a whole other undertaking...
Yes, but one issue is that the amount of redshift depends on the motion of the emitter, so we would have to artificially assign some four-velocity to your surroundings in order to give them some redshift. There doesn't seem to be a "natural" choice for how to do this.
TLDR: redshift depends not only on the position of the source, but also its velocity.
We wanted the app to work on an iPhone and that required the use of Apple Metal code. This could of course be ported to a desktop but we're not sure there would be much interest in that?
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.
The black hole simulation that was shown in the movie Interstellar is explained in detail in this paper, freely available on the arXiv:
https://arxiv.org/abs/1502.03808
As a physicist with a modest background in computing, I was also surprised by how powerful the iPhone GPU is. It can indeed lens the input from the camera at high resolution and in real time with high FPS.
It looks needlessly complicated and messy because the visually interesting region when rotation is turned on is blocked out by the FOV cutouts. We felt it was best to only allow the user to select the full FOV in this mode.
Yes, agreed. We thought it would be fair to call it a "simulation" of what your surroundings would look like if a black hole were within your FOV, but as you say we do not take into account all effects (time delays in particular would require a lot of buffering and we decided this would be impractical to implement, and not that illuminating).
This is still nice when there are so many artistic images of black holes that do not take such care to use known physics to create an accurate image. Well done all. Looking forward to seeing what BHEX sees.
Yes, such a great game---it's a fantastic visualization of special relativity and also fun to play!
I think we're still a ways off from real time GRMHD sims, but CK Chan from UArizona had a working VR simulation (on the Oculus iirc, but now deprecated) that allowed you to explore a pre-existing GRMHD simulation in real time and in 3D. I think he might be working on a new version of this.
Pendatic but can I ask why does this app require 17.5 or later? For reference, the latest iOs version is 18. What specific API is being used to require that version?
As Project Scientist for BHEX, I am of course excited about the project and eager to spread the word about it! But as I wrote in my other comment, what this is really trying to "sell" is gravitational physics to students interested in black holes, and this effort is supported in part by the National Science Foundation.
Does anyone else find it jarring to unexpectedly be shown the selfie camera view? Showing both camera feed thumbnails constantly while using this app is a little odd.
Still, kinda fun, reminds me of playing around with different blur / liquidify filters in photoshop back in the day.
Neat. I'll probably use it for five minutes, appreciate the math that went into it, and move on. But nevertheless, pretty neat.
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.
You need a full 3D scan of the environment of everything the black hole can "see" from the position you want to put it in, not just the traditional "augmented reality" that sits on top of a current camera feed, because black holes are also essentially 360 degree cameras that from some angle will let you see anything around them. Not impossible, but harder than "just" taking an augmented reality feed.
Commenting to reinforce this idea: I'd love an AR approach where I can pin a black hole with a given radius into my living room, and walk around it!
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!
It would be neat to also get stats about the black hole depending on where you are in relation to it (obviously this breaks physics as a micro black hole would immediately fall into the earth). Everything is based on the hawking radiation calculator: https://www.vttoth.com/CMS/physics-notes/311-hawking-radiati...
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).
That is 356 watts of luminosity from something so small?! Whoa! It says the peak of the radiation has an energy of 41 keV though, so better not look at it directly (:
I tried plugging in some other numbers and, at first confusingly, found that the luminosity goes up at lower masses?! But of course it radiates from it's outer shell, not the entire volume.
Wonderful tool, imagine playing with those parameters in AR
Yes, this is one of the wonderful crazy properties of black holes: they get hotter as they evaporate! (More precisely, the Hawking temperature is inversely proportional to the mass!)
That's an excellent idea! And indeed, part of the reason we started with the iPhone is because we've been thinking from the get-go about an eventual extension to Apple Vision Pro. As I wrote in my other comment, this is part of an outreach effort to get the public (and students) excited about black hole physics, so we will always keep the code free and open source.
Not everything needs to generate cash :)
Generating cash is a proxy for generating long term human value
[delayed]
That’s exactly what I thought this would be, imagine my disappointment.
Hello! We are Dr. Roman Berens, Prof. Alex Lupsasca, and Trevor Gravely (PhD Candidate) and we are physicists working at Vanderbilt University. We are excited to share Black Hole Vision: https://apps.apple.com/us/app/black-hole-vision/id6737292448.
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.
There are several additional options you can select when using the app. The first lensing option you can select is "Static black hole". In this mode, we simulate a non-rotating (Schwarzschild) black hole. There are two submodes that change the simulated field-of-view (FOV): "Realistic FOV" and "Full FOV". The realistic FOV mode takes into account the finite FOV of the iPhone cameras, leading to a multi-lobed dark patch in the center of the screen. This patch includes both the "black hole shadow" (light rays that end up falling into the black hole) and "blind spots" (directions that lie outside the FOV of both the front-and-rear-facing cameras). The full FOV mode acts as if the cameras have an infinite FOV such that they cover all angles. The result is a single, circular black hole shadow at the center of the screen.
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).
In a nutshell, the app computes a map from texture coordinate to texture coordinate. This map is itself stored as a texture --- to obtain the value of the map on texture coordinates (x,y), one samples the texture at (x,y) and the resulting float4 contains the outputs (x',y') as well as a status code.
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.
We hope you enjoy watching the world with Black Hole Vision and welcome any questions or feedback. If you like the app, please share it with your friends!
The code was written at Vanderbilt University by Trevor Gravely with input from Dr. Roman Berens and Prof. Alex Lupsasca. This project was supported by CAREER award PHY-2340457 and grant AST-2307888 from the National Science Foundation.
License: This app includes a port of the GNU Scientific Library's (GSL) implementation of Jacobi elliptic functions and the elliptic integrals to Metal. It is licensed under the GNU General Public License v3.0 (GPL-3.0). You can view the full license and obtain a copy of the source code at: https://github.com/graveltr/BlackHoleVision.
By any chance, was Andrew Strominger involved in this at all? He gave the Andrew Chamblin Memorial Lecture in Cambridge last month and demoed something that looked similar.
I think what he showed you was likely a version of this that was coded up by Harvard graduate student Dominic Chang: https://dominic-chang.com/bhi-filter/
It works very well (and in a browser!) but is limited to a non-rotating (Schwarzschild) black hole---we really wanted to include black hole spin (the Kerr case). As we write on the github, talking with Dominic about his implementation was very useful and we are hoping to get a paper explaining both codes out before the end of the year.
Yes, Andy has been very involved in the story of the photon ring and was one of the lead authors on the original paper that started it all: https://www.science.org/doi/10.1126/sciadv.aaz1310
(And he was also my PhD advisor.)
I’m confused by what I see.
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.
I think that’s why this demonstration is interesting. It’s showing how the light can be bent around the black hole. Anything that crosses the event horizon won’t be coming back, but because of the lensing of the light you can “see” behind a black hole.
So if I’m understanding correctly, the black hole is supposed to be between me and what I’m looking at, not in what I’m looking at?
If so, then my question is wouldn’t some light be lost to the black hole? Shouldn’t a substantial portion of the light coming at me from the other side of the black hole disappear into the black hole, making what does lens around dimmer?
Because, for an external observer, time infinitely slows down near the event horizon. In other words, during one hour by the clock of the far-away observer, the time that passes by the clock of the falling observer approaches zero as he approaches the event horizon. So, when you look from the outside, objects get 'frozen' as they approach the event horizon. For the falling observer, nothing special happens at the event horizon, and he just falls through.
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 feel like this app could also be an app clip to make it so that you don’t have to outright install the app to use it: https://developer.apple.com/app-clips/
Very nice – if only I could try it! :'-) Any chance this could be ported to Android, at least for high-end devices with a decent GPU?
Another nice feature would be if it could simulate an accretion disk.
First thing I wondered is what would happen if I pointed it another screen, with an image like this loaded. I realize that it's not realistic due to the z-axis, and field of view, but it's pretty fun.
https://esahubble.org/images/heic0609a/
Is in the middle of black hole zero gravity? Then, is there another event horizon somewhere inside black hole?
I don’t think anybody really knows what‘s inside a black hole. That’s kind of their defining property.
Well technically it approaches infinite gravity. It's a gravitational asymptote. But like the other commenter said, no way to know what it actually is in reality, as we only have mathematical concepts that may or may not match reality.
Just tried to check it out. First boot it crashed, killed app and tried again and now it won’t open. I’ll try and reinstall and do over. iPhone 16 Pro, iOS 18.1
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.
Glad it worked on second boot! We used to have some bugs in the elliptic integral implementation that led to the app crashing, but we think we've eliminated those, so hopefully this is just a fluke... Anyone else with this issue?
Instant download for me. I’m a sucker for anything black hole related.
Glad to hear that! You'll probably also enjoy reading about the Black Hole Explorer (BHEX): a proposed space mission that will take the sharpest images in the history of astronomy and resolve the "photon ring" of orbiting light around a black hole. https://www.blackholeexplorer.org/
I had no idea! Thank you!!
This is awesome. I see that this is GPL and open on GitHub. Thank you for sharing. If you are open to feature requests that I am too lazy and stupid to accomplish on my own, I would appreciate the option to drop the multi camera view and the option to capture a photo. Also plus one to the idea of being able to pin the black hold to a specific orientation so you can see what it looks like to pan around an object adjacent to the black hole.
Adding options to drop the multi-camera view and to capture a screenshot is relatively straightforward, and I think we can implement that in the next update. Pinning the black hole to a specific place is a whole other undertaking...
>physically accurate >event horizon doesn't appear in my room :(
Something to rejoice about, no? ;)
Would a person notice red-shifts from the black hole as well?
Yes, but one issue is that the amount of redshift depends on the motion of the emitter, so we would have to artificially assign some four-velocity to your surroundings in order to give them some redshift. There doesn't seem to be a "natural" choice for how to do this.
TLDR: redshift depends not only on the position of the source, but also its velocity.
As above so below. I love how it looks so similar to a colonoscopy.
There are other apps out there for this kind of black hole vision...
Does it use iPhone-specific features or could it work on, e.g., a desktop
We wanted the app to work on an iPhone and that required the use of Apple Metal code. This could of course be ported to a desktop but we're not sure there would be much interest in that?
Maybe WebGPU would be a good porting target.
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.
The black hole simulation that was shown in the movie Interstellar is explained in detail in this paper, freely available on the arXiv: https://arxiv.org/abs/1502.03808
As a physicist with a modest background in computing, I was also surprised by how powerful the iPhone GPU is. It can indeed lens the input from the camera at high resolution and in real time with high FPS.
Cool, thanks for the reference!
I was able to install it on my M1 Mac, fwiw.
What happens with the rotating one and a realistic POV?
It looks needlessly complicated and messy because the visually interesting region when rotation is turned on is blocked out by the FOV cutouts. We felt it was best to only allow the user to select the full FOV in this mode.
Thanks for the question!
This is not a simulation of a black hole, but rather an image filter that emulates one particular effect.
Yes, agreed. We thought it would be fair to call it a "simulation" of what your surroundings would look like if a black hole were within your FOV, but as you say we do not take into account all effects (time delays in particular would require a lot of buffering and we decided this would be impractical to implement, and not that illuminating).
This is still nice when there are so many artistic images of black holes that do not take such care to use known physics to create an accurate image. Well done all. Looking forward to seeing what BHEX sees.
Glad to hear you're excited about BHEX---we are too!
If you want to read more about what it's going to do, I wrote a blog post about it on the mission website: https://www.blackholeexplorer.org/bhex-blog/lupsasca-stateme...
You're right that the time delays and redshifting wouldn't add much to a toy app, but some of us are here for the physics.
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.
http://gamelab.mit.edu/games/a-slower-speed-of-light/
Yes, such a great game---it's a fantastic visualization of special relativity and also fun to play!
I think we're still a ways off from real time GRMHD sims, but CK Chan from UArizona had a working VR simulation (on the Oculus iirc, but now deprecated) that allowed you to explore a pre-existing GRMHD simulation in real time and in 3D. I think he might be working on a new version of this.
Pendatic but can I ask why does this app require 17.5 or later? For reference, the latest iOs version is 18. What specific API is being used to require that version?
Good point, the minimum version should be an earlier version of iOS, we don’t use any APIs that are only available in 17.5 or later.
Thanks for pointing that out.
As always, wonder what a particular "free" thing is selling and to whom. In this case it's something called BHEX, to NASA.
As Project Scientist for BHEX, I am of course excited about the project and eager to spread the word about it! But as I wrote in my other comment, what this is really trying to "sell" is gravitational physics to students interested in black holes, and this effort is supported in part by the National Science Foundation.
Does anyone else find it jarring to unexpectedly be shown the selfie camera view? Showing both camera feed thumbnails constantly while using this app is a little odd.
Still, kinda fun, reminds me of playing around with different blur / liquidify filters in photoshop back in the day.
Good point. In a future update, we can add a button to show / hide the camera views.