General Relativity

Einstein's Masterpiece: Gravity is the curvature of spacetime. Mass-energy tells spacetime how to curve, and spacetime tells mass-energy how to move.

Chapter 28: Gravitational Lensing

Gravitational lensing โ€” light bending by massive objects โ€” was the first observational confirmation of GR (1919) and is now a major tool for cosmology, detecting dark matter, and finding exoplanets.

Light Deflection

\( \alpha = \frac{4GM}{c^2 b} \)

ฮฑ = deflection angle, b = impact parameter

For the Sun: ฮฑ = 1.75 arcsec (grazing rays). GR predicts twice the Newtonian value!

Types of Lensing

Strong Lensing

Multiple images, arcs, Einstein rings. Galaxy clusters as lenses.

Weak Lensing

Statistical distortion of background galaxies. Maps dark matter!

Microlensing

Brightness changes as stars pass in front. Detects exoplanets!

Python: Gravitational Lensing Simulation

This comprehensive simulation calculates light deflection angles, Einstein radii for various lenses, and microlensing magnification curves, visualizing all key aspects of gravitational lensing.

Complete Gravitational Lensing Calculator

Python

Computes deflection, Einstein radii, and magnification with visualizations

script.py236 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Fortran: Lensing Calculations

This Fortran program performs precise lensing calculations including the solar deflection (confirming GR over Newton), Einstein radii for different lens masses, and magnification formulas.

Gravitational Lensing Visualization

Python

Deflection angle, Einstein radius, and magnification plots

lensing_plot.py157 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server