Skip to content

Instantly share code, notes, and snippets.

@jamesamiller
Created March 18, 2021 21: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/328f3266e8f48cd8876962f9f2ff9fb9 to your computer and use it in GitHub Desktop.
Save jamesamiller/328f3266e8f48cd8876962f9f2ff9fb9 to your computer and use it in GitHub Desktop.
Two-observer diagram of causality violation in special relativity.
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{comment}
\begin{comment}
:Title: Causality Violation
:Author: J A Miller (millerja@uah.edu), 2020/02/04, 2018/03/29
Two-observer diagram showing causality violation in some frame for two spacelike events.
Plot style from McNees
https://gist.github.com/mcnees/45b9f53ad371c38ba6f3759df5880fb1
\end{comment}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{angles}
\usetikzlibrary{quotes}
% McNees color scheme
% https://gist.github.com/mcnees
\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 boost
\newcommand*\vrel{0.6} % velocity of primed frame
\newcommand*\gamrel{1.25} % gamma of primed frame
\newcommand*\etarel{0.75} % their product
% Set some points to plot, if desired
\newcommand*\xpt{4}
\newcommand*\tpt{6}
\newcommand*\xpti{8}
\newcommand*\tpti{7}
\begin{tikzpicture}[scale=1,domain=-1:11]
\tikzstyle{axisarrow} = [-{Latex[inset=0pt,length=8pt]}]
\coordinate (origin) at (0,0);
% Draw the grid.
%\draw [cornflower!30,step=0.2,thin] (-1,-1) grid (11,11); % minor grid lines
\draw [cornflower!60,step=1.0,thin] (-1,-1) grid (11,11); % major grid lines
% Clip all lines that would fall outside the grid
\clip(-1,-1) rectangle (11,11);
% Draw unprimed axes
\draw[thick,axisarrow,cornflower] (0,-1) -- (0,11) node (tup) {};
\node[inner sep=0pt] at (0.25,10.75) {$t$};
\draw[thick,axisarrow,cornflower] (-1,0) -- (11,0) node (xup) {};
\node[inner sep=0pt] at (10.75,-0.25) {$x$};
% Draw primed axes
\draw[thick,axisarrow,scarlet] (0,0) -- (11*\vrel,11) node (tp) {};
\node[inner sep=0pt] at (11*\vrel+0.25,10.75) {$t^\prime$};
\draw[thick,axisarrow,scarlet] (0,0) -- (11,11*\vrel) node (xp) {};
\node[inner sep=0pt] at (10.75,11*\vrel-0.35) {$x^\prime$};
% Draw lines of constant xprime
\foreach \xprime in {-11,-10,-9,...,12}
{
\draw[scarlet!60,thin] plot (\x,\x/\vrel - \xprime/\etarel);
}
% Draw lines of constant tprime
\foreach \tprime in {-11,-10,-9,...,12}
{
\draw[scarlet!60,thin] plot (\x,\x*\vrel + \tprime/\gamrel);
}
% Add some points if needed
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={below:Shoot}](A) at (\xpt,\tpt) {};
\node[circle,draw=cornflower!70,fill=cornflower!20,inner sep=2pt,label={Impact}](B) at (\xpti,\tpti) {};
\end{tikzpicture}
\end{document}
@jamesamiller
Copy link
Author

fig-causality

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