# Worldlines - An Interactive Special Relativity Visualization

## 1 Introduction

### 1.1 Time Dilation & the Lorentz Factor

(See Section 2.2 on the Twin Paradox for the classic Time Dilation example.)

## 2 Scenarios

### 2.1 Axes Scene - Coordinate Transforms & the Simultaneity Plane

The goal of the axes scene (Figure 1) is to show how the system of rest coordinates for a moving particle are mapped into the rest frame of other particles - here, the “world frame” - within which the first particle is moving. The basis vectors for the world frame are labeled $\left(x,y,ct\right)$; and those for the moving particle are labeled $\left(x\text{'},y\text{'},ct\text{'}\right)$.
For any frame $S\text{'}$, the $x\text{'}y\text{'}$ plane gives the surface of simultaneity; events in this plane are simultaneous for observers within the frame. The phenomena of relativity of simultaneity refers to the fact that given events A, B, and C such that A and B are simultaneous in frame $S$, and B and C are simultaneous frame $S\text{'}$, events A and C will generally not be simultaneous in either frame $S$ or $S\text{'}$.
The axes scene (Figure 2) begins with a few simple particles at rest for reference, and a single “driven particle” whose velocity component ${v}_{x}$ is defined as a sine wave oscillating between $0$ and $0.99\phantom{\rule{6px}{0ex}}c$, completing a cycle every $200\phantom{\rule{6px}{0ex}}s$ in the world frame. The driven particle has been made the “target particle”, meaning it's tracked by the camera, and that any coordinate (Lorentz) transforms later activated for display will be done for $\gamma$ between it and the world frame.
Clicking on the particle selects it, showing its identification and some information about its state. In Figure 3 for example, we see an already dramatically stretched axes at $0.95\phantom{\rule{6px}{0ex}}c$ nearly completely collapses with just a $~0.037\phantom{\rule{6px}{0ex}}c$ increase to $0.988\phantom{\rule{6px}{0ex}}c$.
In Figure 4, the particle is again at $0.95\phantom{\rule{6px}{0ex}}c$, but now the Lorentz transforms have been activated - meaning the coordinate space used for display now matches the space of the target particle. This is why the $ct\text{'}$ and $x\text{'}$ basis vectors again appear orthogonal (even at this high speed), since we are now in the the rest frame of the particle. The $ct$ and $x$ basis have been skewed in the opposite directions, stretching off-screen.

#### Check result with simulation:

Figure 7 shows the conclusion of the twin paradox scene with ${v}_{B}=0.9\phantom{\rule{6px}{0ex}}c$ and ${\tau }_{turnaround,B}=50\phantom{\rule{6px}{0ex}}s$. Twin B's age can be verified visually, with 10 segments between yellow clock history ticks, each marking an elapse of $10\phantom{\rule{6px}{0ex}}s$ for the particle's proper time. This gives ${\tau }_{meet,B}=10*10\phantom{\rule{6px}{0ex}}s=100\phantom{\rule{6px}{0ex}}s$ as required in the problem setup.
Twin A is selected, so its age is displayed beneath it. The result is ${\tau }_{A,meet,program}=229.6\phantom{\rule{6px}{0ex}}s$, which is very close to the $229.4\phantom{\rule{6px}{0ex}}s$ expected from the calculation. The $0.2\phantom{\rule{6px}{0ex}}s$ error is due to the time step used to update the particles, and the simple logic used to decide when twin B should begin its return and when the program should consider the particles to have met (pausing the scene).

The “paradox” in this scenario stems from the seeming discrepancy between the symmetry of relative motion between the twins, and the asymmetry between the effect on their rate of temporal experience (and thus, age). See Figure 9 in Section 2.3 for a visualization of the asymmetry resolving the paradox - the fact that Twin B turns around, while Twin A does not.

### 2.3 Multiple Twins Scene

#### 2.3.1 Scene Layout and Invariant Surfaces

Looking in Figure 8 at the curves formed by ticks corresponding to the same time (ie, $tic{k}_{1}=10\phantom{\rule{6px}{0ex}}s$) between the particles (before the turnaround at $\tau =50\phantom{\rule{6px}{0ex}}s$), one can see the surfaces of “constant time” for a traveler starting at the origin of departure. In worlds like ours for which SR holds true, these surfaces appear curved in any reference frame due to the time dilation effect between different frames. If SR were not true, the surfaces would be flat, indicating an absolute (rather than relative) time between different reference frames.

#### 2.3.2 The Asymmetry of the Turnaround (Resolving the Paradox)

Figures a through d show the asymmetry in the twin paradox. In the world frame (Figure a), by the time twin B reaches ${\tau }_{B}=50\phantom{\rule{6px}{0ex}}s$ (that is, by his clock), twin A has already missed the opportunity to take the action which twin B now takes, changing his frame of reference by reversing his velocity. This is seen by looking at the clock tick history in the last image (Figure d), where we see that just after twin B turns, just over $80\phantom{\rule{6px}{0ex}}s$ has elapsed for twin A. Figures b and c show how this turnaround looks from the frame of twin B just before and after the acceleration.

### 2.4 Length Contraction Scene

#### 2.4.1 Length Contraction Scene Layout

The goal of the Length Contraction Scene is to show how fixed lengths measured in the world frame are contracted in the rest frame of a particle at relativistic speeds. Figure 10 shows the layout of the length contraction scene in the world rest frame - a single driven target particle (${v}_{x}$ oscillating from 0 to $0.99\phantom{\rule{6px}{0ex}}c$ every $200\phantom{\rule{6px}{0ex}}s$), uniform grid of particles at rest, and their intersections with the target's surface of simultaneity.
To emphasize the contraction effect, the target particle in this scene undergoes dramatic, oscillating acceleration. The simple, dense spacing of the particle field is chosen in hope of leveraging the user's spatial intuition to help give a better feel for the nature of the transformations shown. Particle path intersections with the target's simultaneity plane take focus here, as we use them to show how distances between events simultaneous for the moving particle are contracted in its frame of reference.

#### 2.4.4 Checking the measurement

From this, we see our measurement of $14.1ls$ (Figure 17) is just what we would expect from the formula for Lorentz contraction.

### 2.5 Bell's Spaceship Paradox Scene

This is a fun scene (Figure 18) in which you can control a fleet of ships, which are modeled as idealized rigid bodies. The bodies are “attached” to a particle by defining body vertices at constant points in the particle's rest frame, which are then mapped by an inverse Lorentz transform to the world frame (followed by any active display transforms). Finally, the body is drawn as yellow lines between each body vertex every time the particle's frame changes due to acceleration (along with the body at the current simulation step).
You can accelerate the fleet in synchronization by pressing the arrow keys or the W, A, S, D keys, as demonstrated in Figures 19 and 20 (which show the results of the same acceleration sequence from the perspective of the world frame and the fleet's rest frame).
The paradox is that each ship receives the same boost in the world frame - so the relative position of each ship in the fleet is preserved; their relative acceleration is 'uniform' by definition. Similarly, the internals of any particular ship appears preserved to its inhabitants, who are in its rest frame, so the acceleration appears 'uniform' to them as well.
If one considers the fleet of ships as an entity, then Born rigidity is not preserved - though their positions are preserved in the world frame, Born rigidity is defined as preservation in the rest frame. In Figure 21, we see the target moving towards the fleet. Holding this velocity, we see from the path intersections that their locations in this frame are vastly stretched, confirming our expectation that the Born rigidity of the fleet is broken.

## 3 Program Manual

### 4.1 Tools

#### 4.1.2 Libraries: VTextRenderer, ControlP5, Apache Math Commons

Processing has a great user community, forums, and reference docs. I've used two user-created libraries in particular - V*'s (Victor Martin's) VTextRenderer (2), for OpenGL text labels, one thing lacking in Processing; and Andreas Schlegel's ControlP5 gui library (3).

# Appendix

## A Source Notes

### A.15 VTextRenderer

Written by V* (Victor Martin) (2). Renders text in OpenGL.