PHYS·07 Gravity Lens — drag a massive object through a star field; the thin-lens equation displaces every star by the Einstein deflection angle; at perfect alignment a source blooms into a full ring; tap the hero to send the lens drifting toward your finger

Physics Lab · Experiment 07 · gravitational lensing

Stars that bend.

A massive object between you and the stars doesn't block them — it displaces them. The thin-lens equation redraws every star's apparent position; bring source, lens, and eye into alignment and the star blooms into an Einstein ring. Tap anywhere to send the lens drifting toward your finger.

β = θ − θE²/θ
scroll
[00]The lens

the first experiment in the series without a time-integration — the displacement is a pure map, recalculated every frame

Equation
β = θ − θE²/θ · the point-mass thin-lens relation — for every apparent position θ, solve for the true source position β; if no real source is there, that pixel is dark
Einstein ring
when source, lens, and observer are perfectly collinear, β = 0 has solutions at all azimuths — the point source smears into a complete circle whose radius is the Einstein radius θE
Stars
each star is a Gaussian blob; its apparent position is shifted radially from the lens by the deflection formula — the lens doesn't generate new light, it remaps where you're looking
Magnification
a lensed image is also brighter because the solid angle is stretched — the Einstein ring glows, not because more photons exist, but because more of them reach you
Interaction
hero: tap drifts the lens to your finger · bench: drag the lens anywhere, raise mass to enlarge the ring, shift source offset to break it into arcs
Status
🟢 bending · pauses offscreen · reduced-motion still redraws when you move the lens · stars twinkle unless reduced-motion is on
[01]Six images

everything a gravity lens knows how to show

01 · the equation

Deflection by curvature

Einstein's 1915 prediction: a photon passing mass M at distance b is deflected by 4GM/bc². The thin-lens formula here folds that into one algebraic map applied to every star every frame — no ray-marching, no ODE.

δα = 4GM/bc² · β = θ − θE²/θ
02 · the ring

Alignment blooms

When source and lens share a line of sight, the deflection has full rotational symmetry and the solution wraps 360°.

03 · arcs

Symmetry broken

Move the source slightly off-axis and the ring splits into two mirrored arcs on opposite sides of the lens — one inside the Einstein radius, one outside. Move further and they pull into two distorted images.

04 · the field

Every star displaced

The lens doesn't just affect the source — it deflects every star in the background, crowding them outward from its shadow. The whole field is warped, not just the source you're watching.

05 · magnification

More light, same sky

A lensed image is brighter because its solid angle is stretched. The lens is a free telescope made of space.

μ = |θ/β · dθ/dβ|
06 · dark matter

Mass without light

Astronomers measure how entire galaxy fields distort coherently behind a foreground cluster. The distortion is there; the thing causing it isn't visible. Gravitational lensing is the only direct probe of dark matter's distribution.

[02]The bench

drag the lens · mass grows the Einstein ring · source offset breaks it into arcs · alignment button = perfect ring

mass 68 source offset 20
Field note: 06's magnet had no time either, but the magnet field is a vector map — you read its direction. 07 is an image map: for each pixel on screen, the lens equation tells you which sky coordinate to sample. The sky doesn't move; your view of it does. That's why dragging the lens feels like sliding a glass ball across a photograph rather than pushing particles around — you're not simulating physics forward in time, you're recomputing the geometry of where you're looking.