HNHacker News
TopNewBestAskShowJobs

lupsasca

221 karma · joined November 18, 2024

https://lupsasca.com
submissionscomments
lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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).
lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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.
lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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?
lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
Something to rejoice about, no? ;)
lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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.

lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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.

lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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).

lupsasca··on Show HN: Physically accurate black hole simulation using your iPhone camera
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.

← PreviousPage 2 of 2