Skip to content

Instantly share code, notes, and snippets.

@jamesamiller
Last active March 19, 2021 20:28
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/e5e7a8ff5e4c1c3d2f23b6c1e5be83e0 to your computer and use it in GitHub Desktop.
Save jamesamiller/e5e7a8ff5e4c1c3d2f23b6c1e5be83e0 to your computer and use it in GitHub Desktop.
Spacetime diagram for Klingon and Enterprise battle (special relativity). First variation.
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{comment}
\begin{comment}
:Title: Klingons and Federation I
:Author: J A Miller, UAH Physics & Astronomy, millerja@uah.edu
2020/07/01
Spacetime diagram of an attack on the Enterprise by the Klingons. The first of a few variations.
References:
I can't remember. I think "A traveler's guide to spacetime" by T. Moore
Basic plot style from
https://gist.github.com/mcnees/45b9f53ad371c38ba6f3759df5880fb1
---------------------------------------------------------------------
Problem to accompany figure
---------------------------------------------------------------------
\ditem{Federation-Klingons I}\label{exer-klingonI} The Federation starship Enterprise is floating in Federation territory at rest relative to the border of Klingon space, which is $\SI{6}{\minute}$ away in the $+x$ direction. Suddenly, a Klingon warship flies past the cruiser in the direction of the boarder at a speed $v= 3/5$. Call this event A and let it define time zero in both the Klingon and Enterprise reference frames. At $t_B = \SI{5}{\minute}$ according to the Enterprise clocks, the Klingons emit a parting disruptor blast (event B) that travels at the speed of light back to the Enterprise. The blast hits the Enterprise and disables it (event C), and a bit later the Klingons cross the border into Klingon territory (event D).
\begin{enumerate}[label=(\alph*),nosep]
\item Verify that Figure \ref{fig-klingonI} is the two-observer diagram for this situation.
\item When does the disruptor blast hit, and when do the Klingons pass into their own territory, according to clocks in the Enterprise?
\item The Klingon-Federation Treaty states that it is illegal for a Klingon ship in Federation territory to damage Federation property. When the case comes up in interstellar court, the Klingons claim that they are within the letter of the law, since according to measurements made in their reference frame, the damage to the Enterprise occurred after they have crossed back into Klingon territory: hence they were not in Federation territory at the time. Did event C (disruptor blast hits the Enterprise) really happen after event D (Klingons cross into Klingon territory) in the Klingon's frame?
\end{enumerate}
---------------------------------------------------------------------
Figure caption
---------------------------------------------------------------------
\caption{
Spacetime diagram for the Klingon provocation. \textit{Orthogonal blue arrows:} The unprimed frame of the Enterprise (and the border). \textit{Red arrows:} The primed frame of the Klingon ship. \textit{Green arrow:} The worldline of the Klingon disruptor blast. \textit{Purple arrow:} Worldline of the Klingon Border. For Exercise \ref{exer-klingonI}.
}
---------------------------------------------------------------------
Solution to problem
---------------------------------------------------------------------
\ditem{Federation-Klingons I} One very important thing to note in general here... Look at the worldline of light (the phasor). In the unprimed frame it travels one unit in $x$ in one unit of $t$. In the primed frame it also travels one unit in $x^\prime$ in one unit of $t^\prime$. \emph{Light worldlines are the same in both frames.} Again, this is a consequence of the eigenvectors of the Lorentz matrix $\Lambda$ being $(1,1)$ and $(-1,1)$.
\begin{enumerate}[label=(\alph*),nosep]
\item Yes, it is.
\item According to the Enterprise, the blast hits the Enterprise at $t=\SI{8}{\minute}$ and the Klingons make it to the border at $t=\SI{10}{\minute}$.
\item Yes. Note that, in the Klingon Frame, the damage to the Federation ship occurs at $t^\prime = \SI{10}{\minute}$, which is \emph{after} they enter their territory at $t^\pr = \SI{9}{\minute}$. So, both parties are correct. (But the Klingons \emph{did} initiate the events that would lead to the damage while in Federation territory, even in their frame.)
Finding this unacceptable and their extermination long overdue, Starfleet releases a long-forgotten 21st century pathogen called SARS-CoV-2 on the Klingon home world. The Klingons refuse to wear masks and go extinct throughout the quadrant in short order.
\end{enumerate}
\end{comment}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,calc,intersections}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepackage{xcolor}
\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}
% ----------------------- parameter specifications ------------------------
% the speed of the klingons
\newcommand*\vk{0.6}
% border location
\newcommand*\xborder{6.0}
% graph boundaries
\newcommand*{\xa}{-1} % lower left corner
\newcommand*{\ya}{-1}
\newcommand*{\xb}{11} % upper right corner
\newcommand*{\yb}{11}
% x and y scales
\newcommand*{\xscale}{1cm}
\newcommand*{\yscale}{1cm}
% some calculations now ...
% gamma and eta factors for the klingons
\pgfmathsetmacro{\gamk}{1/sqrt(1-\vk*\vk)}
\pgfmathsetmacro{\etak}{\vk*\gamk}
% ------------------------ other functions ------------------------------
% ------------------------ begin figure ------------------------------
\begin{document}
\begin{tikzpicture}[
scale=1,
domain=\xa:\xb,
x=\xscale,y=\yscale,
axisarrow/.style=-{Latex[inset=0pt,length=10pt]},
minor gridlines/.style={cornflower!30,step=0.2,thin},
major gridlines/.style={cornflower!60,step=1.0,thin},
axes/.style={cornflower,thick,axisarrow}, % unprimed axes
primed axes/.style={scarlet,thick,axisarrow}, % primed axes
primed major gridlines/.style={scarlet!60,thin},
double primed axes/.style={chameleon,thick,axisarrow}, % double primed axes
double primed major gridlines/.style={chameleon!60,thin},
LOS primed/.style={scarlet,thick,dashed}, % line of simultaneity in primed frame
LOS double primed/.style={chameleon,thick,dashed}, % line of simultaneity in primed frame
light ray/.style={sunrise,thick,axisarrow},
textnode/.style={inner sep=0pt}, % for a text only node
dot/.style={circle,draw=scarlet!70,fill=scarlet!20,inner sep=1.5pt}
]
% some coordinates
\coordinate (O) at (0,0);
% Draw the grid.
%\draw [minor gridlines] (\xa,\ya) grid (\xb,\yb);
\draw [major gridlines] (\xa,\ya) grid (\xb,\yb);
% Draw unprimed axes
\draw[axes,name path=taxis] (0,\ya) -- (0,\yb);
\node[textnode] at (0.25,\yb-0.5) {$t$};
\draw[axes,name path=xaxis] (\xa,0) -- (\xb,0);
\node[textnode] at (\xb-0.5,-0.25) {$x$};
% Draw the primed axes (klingon frame)
\draw[primed axes,name path=tpaxis] (O) -- (\vk*\yb,\yb) node (tp) {};
\node[textnode] at ($(tp)+(0,-0.5)$) {$t^\prime$};
\draw[primed axes,name path=xpaxis] (O) -- (\xb,\vk*\xb) node (xp) {};
\node[textnode] at ($(xp)+(-0.2,-0.4)$) {$x^\prime$};
% We need some gridlines in the primed frame too
% and some clipping
\clip(\xa,\ya) rectangle (\xb,\yb);
% Draw lines of constant xprime
\foreach \xprime in {-11,-10,-9,...,12}
{
\draw[primed major gridlines] plot (\x,\x/\vk - \xprime/\etak);
}
% Draw lines of constant tprime
\foreach \tprime in {-11,-10,-9,...,12}
{
\draw[primed major gridlines] plot (\x,\x*\vk + \tprime/\gamk);
}
% Worldline of klingon border
\draw[plum,thick,axisarrow,name path=wborder] (\xborder,0) -- (\xborder,\yb);
% Worldline of phaser
\coordinate (B) at (3,5);
\coordinate (C) at (0,8);
\draw[thick,axisarrow,chameleon] (B) -- (C);
\node[dot,label={above right:C}] at (C) {};
\node[dot,label={right:B}] at (B) {};
% A couple more points
\path [name intersections={of=tpaxis and wborder,by=D}];
\node[dot,label={right:D}] at (D) {};
\node[dot,label={below left:A}] at (O) {};
% \node[inner sep=0pt,rotate=90] at (-0.3,4) {Enterprise worldline};
%\node[inner sep=0pt,rotate=59] at (4.3,7.8) {Klingon worldline};
%\node[inner sep=0pt,rotate=90] at (6.3,1.8) {Border worldline};
\end{tikzpicture}
\end{document}
@jamesamiller
Copy link
Author

fig-klingonI

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