Simulation of Special Relativity
Most of us are familar to some degree with the theory of relativity. Chances are
you've heard of the concept of time dialation; objects at experience time at a
slower rate as they approach the speed of light.
Presenting these relativistic effects in a interactive manner is quite difficult as
we normally never approach anywhere near the speed of light. So I built a simulation
where the speed of light is only 10 m/s.
Light speed is the speed limit of the universe. Constant acceleration will have you asymptotically approach light speed.
To visualize time dialation, I have each pixel hueshift over time. Further away pixels appear as different colors as we are seeing a version of them from the past. The slower the speed of light is (and thus the larger in the information latency), the tighter the color bands will appear.
Hueshift with infinite light speed. All pixels appear the same color.
Hueshift with slow light speed. Color bands form due to information latency.
Time Dialation and the Twin Paradox
Say we have person A, who is stationary, and person B, who is moving. We know that due to time dialation,
person B will experience time at a slower rate than person A.
But why can't we view this situation from person B's perspective. From their perspective, they
are stationary, and its person A who's moving. Shouldn't person A be the one experiencing time slower?
It turns out, both observers see the other move through time slower.
GIF moving objects experience time slower, and so they hue shift slower GIF while moving, the world experiences time slower from our perspective
Moving objects experience time slower, so the hue shift slower
This initially seems like a contradiction. Lets consider it through the famous Twin Paradox.
We have twin A and twin B. Twin B flies to and from a far away planet at near light speed. When they meet back up, twin B has aged less due to time dialation. But if we consider this situation from twin B's perspective, she sees twin A move at near light speed in the opposite direction. From her perspective, its twin A that experiences time dialation has therefore aged less. Obviously they can both be right, so where did we go wrong?
This solves the "paradox" of the Twin Paradox. Its true that twin B sees twin A experience time at a slower rate as she travels to and from the planet. However, unlike twin A, twin B must turn around. As twin B accelerates back in the direction of her home planet, she sees twin A age rapidly. When twin B accounts for this acceleration period, she realizes that twin A has indeed aged more.
The exact details of why this is the case is a bit hard to explain without getting deep into the geometry of space-time, which would require a dedicated section.