Massive objects in deep space can gravitationally bend light coming from behind them, acting as lenses. These astronomical visual effects, first predicted by Einstein at the beginning of the last century and more recently observed by the Hubble telescope and other instruments, can be used as natural magnifying glasses as well as sources of insight into Einstein's celebrated Theory of General Relativity.

Using Python, we built a simple program capable of modifying arbitrary images to simulate the presence of a massive object between the image and the observer. The mass of the object, as well as the relevant distances between the object, observer, and image, can be modified and compared to observed or predicted gravitational lenses in nature.

We use our program to observe some of the stranger effects of gravitational lensing, such as double-images, Einstein rings, and seeing light coming from 'behind' an opaque object without moving it. We also check Einstein's prediction that a probe at a certain distance from our sun could use the sun's mass as a natural astronomical lens to magnify distant objects.

Future additions to the project might include generating animated images showing the effect of moving masses, as well as allowing multiple massive objects to simultaneously affect a single image (which would allow the observation of double Einstein rings and other naturally rare events).

Built With

Share this project:

Updates