GravyLensing¶
GravyLensing is a real-time gravitational lensing demo. It takes a live camera feed, works out where the “mass” is in each frame — a person, or an object of a chosen colour — and uses an FFT-based deflection calculation to lens a background image around it, at camera frame rate.
It was built for public engagement and outreach, with support from the Goodwood Festival of Speed Future Lab. The physics is the real thing: the mask acts as a projected mass distribution, and the background image is deflected the way a distant galaxy is deflected by a foreground cluster.
New here? Start with Installation, then Quick start. Before running the demo in front of an audience, read Ways to run the demo — the choice between mirror mode and telescope mode shapes everything else — and Running a good demo.
Contents¶
- Installation
- Quick start
- Ways to run the demo
- Functionality
- Running a good demo
- FAQ
- Everyone walking past gets lensed. How do I stop that?
- Should the image be mirrored or not?
- How far back does the camera need to be in telescope mode?
- The mask flickers, and the lens flickers with it
- Colour tracking worked this morning and not this afternoon
- Which colour object works best?
- Nothing looks like it is being lensed
- Should I just turn the strength up?
- The frame rate is poor
- The edges of the frame look wrong, as if the distortion wraps around
- Why does the first start take longer after I change background settings?
- Can I use my own background images?
- The camera is not the one I wanted, or the resolution is not what I asked for
- Does it run on anything other than macOS?
- Do I need to be online?
Contributing¶
Contributions, issues, and feature requests are welcome. Fork the repository and open a pull request.
License¶
GravyLensing is free software made available under the GNU General Public License v3.0. See LICENSE for details.