Spacetime Diagram

In the Demonstration, the observer at rest relative to the events is in the (black) unprimed coordinates while the observer in relative motion is in the (red) primed coordinates. There are four events (indicated by the locator objects) that can be repositioned by the user. The dashed lines project the events onto the respective time axis. The intersection with the axis is  indicated by a dot; the dashed lines and dots are drawn in the appropriate color for the current observer. Four different measurements are available through the radio buttons: the "turn-on" sequence is the actual order in which the events occur while the "apparent turn-on" sequence is the order in which the events occur according to the respective observer (primed or unprimed). The relative speed can be varied with the slider to illustrate how the sequence of events depends upon the observer's relative motion with respect to the events.

Written by: Kenny F. Stephens II

x={1,0};
y={0,1};
L=12;
T=15;
dx=Cos[((3π)/4)];
dy=Sin[((3π)/4)];
Manipulate[
Graphics[
{(* S axes *)
Arrow[{{-0.5,0},{L,0}}],Text[Style["x",20,Italic],{L+0.1,0},{-1,0}],
Arrow[{{0,-0.5},{0,T}}],Text[Style["t",20,Italic],{0,T+0.1},{0,-1}],
(* event light trajectories *)
{Dashed,PointSize[Large],
Switch[diagram,
1, (* actual turn-on in S *)
{Line[{{0,#.y},{L,#.y}}]&/@{a,b,c,d},
Point[{0,#.y}]&/@{a,b,c,d}},
2, (* apparent turn-on in S *)
{Line[{#,{0,((dx #.y-dy #.x)/dx)}}]&/@{a,b,c,d},
PointSize[Large],Point[{0,((dx #.y-dy #.x)/dx)}]&/@{a,b,c,d}},
3,(* actual turn-on in S' *)
{Red,Line[{#,{((#.y-Tan[β]#.x)/(Tan[(π/2)-β]-Tan[β])),(((#.y-Tan[β]#.x)/(Tan[(π/2)-β]-Tan[β]))-#.x)Tan[β]+#.y}}]&/@{a,b,c,d},
Point[{((#.y-Tan[β]#.x)/(Tan[(π/2)-β]-Tan[β])),(((#.y-Tan[β]#.x)/(Tan[(π/2)-β]-Tan[β]))-#.x)Tan[β]+#.y}]&/@{a,b,c,d}},
4,(* apparent turn-on in S' *)
{Red,Line[{#,{((#.x+#.y)/(Tan[(π/2)-β]+1)),-(((#.x+#.y)/(Tan[(π/2)-β]+1))-#.x)+#.y}}]&/@{a,b,c,d},

Point[{((#.x+#.y)/(Tan[(π/2)-β]+1)),-(((#.x+#.y)/(Tan[(π/2)-β]+1))-#.x)+#.y}]&/@{a,b,c,d}}
]},
(* light turn-on times *)
{Dotted,PointSize[Large],
Point[{a,b,c,d}]},
(* S' axes, force axes to fill graph area but with correct slope *)
{Red,
Arrow[{{0,0},{L,L Tan[β]}}],Text[Style["x'",20,Italic],{L,L Tan[β]},{-1.5,0}],
Arrow[{{0,0},{T Cot[(π/2)-β],T}}],Text[Style["t'",20,Italic],{T Cot[(π/2)-β],T},{-1.5,-1}]}},PlotRange->{{-0.05L,1.1L},{-0.05T,1.1T}},ImageSize->280],
{{β,(π/50.),"% speed of light:"},0.,((85.π)/400),.01,Appearance->"Labeled",ImageSize->Tiny},
{{diagram,1,"diagram:"},{1->"turn-on sequence in S",2->"apparent turn-on sequence in S",3->"turn-on sequence in S'",4->"apparent turn-on sequence in S'"},ControlType->RadioButtonBar,Appearance->"Vertical"},
{{a,{2,6}},ControlType-> Locator},(* locator coordinates correspond to event coordinates *)
{{b,{4,4}},ControlType-> Locator},
{{c,{6,2}},ControlType-> Locator},
{{d,{8,4}},ControlType-> Locator},
ControlPlacement->Left,SaveDefinitions->True,AutorunSequencing->{1,2}]