Skip to content

Instantly share code, notes, and snippets.

@jamesamiller
Last active February 14, 2020 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesamiller/6871009085afe8101f20ef6be7297602 to your computer and use it in GitHub Desktop.
Save jamesamiller/6871009085afe8101f20ef6be7297602 to your computer and use it in GitHub Desktop.
Two spacehips passing each other according to special relativity
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{comment}
\begin{comment}
:Title: Two passing spaceships
:Author: J A Miller, UAH Physics & Astronomy, millerja@uah.edu
2020/02/14
Two spaceships passing each other
The distance between neighboring grid lines is one.
Basic plot style and colors from McNees
https://gist.github.com/mcnees/45b9f53ad371c38ba6f3759df5880fb1
---------------------------------------------------------------------
Problem to accompany figure
---------------------------------------------------------------------
\emph{Two Passing Spaceships} Two spaceships, each with a speed of $3/5$ in the Earth frame, pass each other heading in opposite directions.
\begin{enumerate}[label=(\alph*),nosep]
\item What is the length of each ship in the Earth frame?
\item What is proper length of either ship?
\item Suppose someone on ship 1 measures the length of ship 2. What length would they find? (Hint: Once you decide which points to use to calculate this, you can determine their coordinates in the Earth frame by looking at intersecting lines, and then use the Lorentz transformation.)
\end{enumerate}
---------------------------------------------------------------------
Solution to problem
---------------------------------------------------------------------
\emph{Two Passing Spaceships}
\begin{enumerate}[label=(\alph*),nosep]
\item It's the distance between the front and back worldlines at constant $t$, so $5$.
\item Take ship 1 and call that the primed frame. It's the distance between the front and back worldlines again, but now at constant $t^\prime$. Hence, we can take the distance between points C and S along the $x^\prime$ axis. At point S, $x^\prime = 0$. We now need $x^\prime$ at point C.
The equation for the $x^\prime$ axis is $t = v x$. The equation for the front of ship 1 is $t = (x-5)/v$. Solving, they intersect at $x= 125/16, t= 75/16$. The corresponding value of $x^\prime$ is found by the Lorentz equation
\begin{equation}
x^\prime = \gamma (x - v t),
\end{equation}
which gives $x^\prime =25/4$. The proper length is thus $25/4 = 6.25$.
\item You need to use a line of constant $t^\prime$, say the $x^\prime$ axis. In that case, the length of ship 2 according to ship 1 is the distance between points A and B. The problem is that you now need the $x^\prime$ coordinates of those points.
For point A, the equation for the front of ship 2 is $t = -(x-12)/v$, where we had to make the velocity negative. The solution to this equation and that for the $x^\prime$ axis is $x = 150/17, t=90/17$. Using the Lorentz transformation above, we get that $x^\prime$ at point A is $120/17$.
For point B, the worldline is $t=-(x-17)/v$, which intersects the $x^\prime$ axis at $x=25/2, t=15/2$, so that $x^\prime = 10$.
Hence, the length of ship 2 is $50/17 \approx 2.94$.
\end{enumerate}
\end{comment}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
% colors
\definecolor{plum}{rgb}{0.36078, 0.20784, 0.4}
\definecolor{chameleon}{rgb}{0.30588, 0.60392, 0.023529}
\definecolor{cornflower}{rgb}{0.12549, 0.29020, 0.52941}
\definecolor{scarlet}{rgb}{0.8, 0, 0}
\definecolor{brick}{rgb}{0.64314, 0, 0}
\definecolor{sunrise}{rgb}{0.80784, 0.36078, 0}
\definecolor{lightblue}{rgb}{0.15,0.35,0.75}
\begin{document}
% Define the lower left corner of the x-t region
\newcommand*\xmin{-1}
\newcommand*\tmin{-1}
% Define the upper right corner of the x-t region
\newcommand*\xmax{18}
\newcommand*\tmax{18}
% Speed of either ship
\newcommand*\vrel{0.6}
% The diagram
\begin{tikzpicture}[scale=1,domain=\xmin:\xmax]
\tikzstyle{axisarrow} = [-{Latex[inset=0pt,length=8pt]}]
\coordinate (origin) at (0,0);
% Draw the grid.
\draw [cornflower!30,step=0.2,thin] (\xmin,\tmin) grid (\xmax,\tmax); % minor grid lines
\draw [cornflower!60,step=1.0,thin] (\xmin,\tmin) grid (\xmax,\tmax); % major grid lines
% Clip all lines that would fall outside the grid
\clip(\xmin,\tmin) rectangle (\xmax,\tmax);
% Draw unprimed axes. May need to fiddle with label placement.
\newcommand*{\eps}{0.25} % fiddling value
\draw[thick,axisarrow,cornflower] (0,\tmin) -- (0,\tmax) node (tup) {};
\node[inner sep=0pt] at (\eps,\tmax-\eps) {\Large $t$};
\draw[thick,axisarrow,cornflower] (\xmin,0) -- (\xmax,0) node (xup) {};
\node[inner sep=0pt] at (\xmax-\eps,-\eps) {\Large $x$};
% Draw primed axes
\draw[thick,axisarrow,scarlet] (0,0) -- (\vrel*\tmax,\tmax) node (tp) {};
\node[inner sep=0pt] at (\vrel*\tmax+\eps,\tmax-\eps) {\Large $t^\prime$};
\draw[thick,axisarrow,scarlet] (0,0) -- (\xmax,\vrel*\xmax) node (xp) {};
\node[inner sep=0pt] at (\xmax-\eps,\vrel*\xmax-2*\eps) {\Large $x^\prime$};
% Draw front of ship 1
\draw[thick,axisarrow,scarlet] (5,0) -- (\vrel*\tmax+5,\tmax) node (sonef) {};
% Draw the front and back of ship 2
\draw[thick,axisarrow,chameleon] (12,0) -- (-\vrel*\tmax+12,\tmax) node (stwof) {};
\draw[thick,axisarrow,chameleon] (17,0) -- (-\vrel*\tmax+17,\tmax) node (stwob) {};
% Label the worldlines
\newcommand*{\rotlabel}{61.5}
\node[inner sep=0pt,rotate=\rotlabel] at (15,16) {\large Ship 1 Front};
\node[inner sep=0pt,rotate=\rotlabel] at (10,16) {\large Ship 1 Back};
\node[inner sep=0pt,rotate=-\rotlabel] at (2,16) {\large Ship 2 Front};
\node[inner sep=0pt,rotate=-\rotlabel] at (7,16) {\large Ship 2 Back};
% Drop some points
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={above left:\large S}](S) at (0,0) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={left:\large C}](C) at (125/16,75/16) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={right:\large A}](A) at (150/17,90/17) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={right:\large B}](B) at (25/2,15/2) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={right:\large E}](E) at (11,10) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={right:\large D}](D) at (6,10) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={right:\large F}](F) at (8.5,14.1) {};
\end{tikzpicture}
\end{document}
@jamesamiller
Copy link
Author

fig-twoships

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment