Skip to content

Instantly share code, notes, and snippets.

@jamesamiller
Last active May 13, 2020 17:13
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/fcf84b90d7e582fe2324a1318c5d86c3 to your computer and use it in GitHub Desktop.
Save jamesamiller/fcf84b90d7e582fe2324a1318c5d86c3 to your computer and use it in GitHub Desktop.
Draws the accelerated coordinates $\xi$ and $\eta$ in special relativity on the inertial $x$-$t$ system.
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{comment}
\begin{comment}
:Title: Accelerated coordinate system
:Slug: Accelerated coordinates
:Tags: special relativity
:Author: J A Miller, UAH Physics & Astronomy, millerja@uah.edu, 2020/05/12
Plot of accelerated coordinates $\xi$ and $\eta$ on an $x$-$t$ inertial spacetime.
Basic plot style and colors from:
https://gist.github.com/mcnees/45b9f53ad371c38ba6f3759df5880fb1
---------------------------------------------------------------------
Background
---------------------------------------------------------------------
The equations of motion for an object undergoing uniform proper acceleration $\alpha$ are
\begin{equation}
\begin{split}
x &= \frac{1}{\alpha} \cosh(\alpha \tau) - \frac{1}{\alpha} + x_0 \\
t &= \frac{1}{\alpha} \sinh(\alpha \tau),
\end{split}
\end{equation}
where $\tau$ is the proper time, and $x_0$ is the starting location.
Accelerated coordinates are
\begin{equation}
\begin{split}
\xi &= \qty[ \qty( x - x_0 + \frac{1}{\alpha} )^2 - t^2 ]^{1/2} - \frac{1}{\alpha} \\
\eta &= \frac{1}{\alpha} \tanh^{-1} \frac{t}{x - x_0 + 1/\alpha}.
\end{split}
\end{equation}
When you put the equations of motion into these coordinates, you get $\xi = 0$ and $\eta = \tau$, as you would want. The object stays stationary at $\xi=0$ as the coordinate system rides with it. The quantity $\eta$ is the time coordinate, and equals the proper time.
The inverse transformation is
\begin{equation}
\begin{split}
x &= \qty( \frac{1}{\alpha} + \xi ) \cosh(\alpha \eta) - \frac{1}{\alpha} + x_0 \\
t &= \qty( \frac{1}{\alpha} + \xi ) \sinh(\alpha \eta),
\end{split}
\end{equation}
These are used to plot lines of constant $\xi$ and $\eta$ on an $x$-$t$ space.
\end{comment}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{pgfplots,calc}
\pgfplotsset{compat=1.16}
\usepackage{xcolor}
% 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}
% ----------------------- user specifications ------------------------
% maximum proper time for the lines of constant $\xi$
\newcommand{\etamax}{3.0}
% proper acceleration
\newcommand{\accel}{1.0}
% --------------some calculations and another spec -----------------
% inverse of acceleration
\pgfmathsetmacro{\accelinv}{1/\accel}
% initial starting point
\newcommand{\xinit}{\accelinv} % $x_0$
% ------------------------ begin figure ------------------------------
\begin{tikzpicture}[scale=0.75,domain=-1:16]
\tikzstyle{axisarrow} = [-{Latex[inset=0pt,length=7pt]}]
% Draw the background grid.
\draw [cornflower!30,step=0.2,thin] (-1,-12) grid (18,12);
\draw [cornflower!60,step=1.0,thin] (-1,-12) grid (18,12);
% Unprimed axes
\draw[cornflower,thick,axisarrow] (0,-12) -- (0,12);
\node[inner sep=0pt] at (0.5,11.7) {$t$};
\draw[cornflower,thick,axisarrow] (-1,0) -- (16,0);
\node[inner sep=0pt] at (15.5,-0.4) {$x$};
% Clip everything that falls outside the grid
\begin{scope} % start SCOPE
\clip(-1,-12) rectangle (16,12);
% Light rays from the origin
\draw[chameleon,thick] (0,0) -- (12,12);
\draw[chameleon,thick] (0,0) -- (12,-12);
% Plot lines of constant $\xi$
\foreach \xi in {0,1,2,3,...,14}
{
\draw[domain=0:\etamax,smooth,variable=\eta,scarlet,thick,samples=20]
plot ({(\accelinv+\xi)*cosh(\accel*\eta)-\accelinv+\xinit},{(\accelinv+\xi)*sinh(\accel*\eta)});
\draw[domain=0:\etamax,smooth,variable=\eta,scarlet,thick,samples=100]
plot ({(\accelinv+\xi)*cosh(\accel*\eta)-\accelinv+\xinit},{-(\accelinv+\xi)*sinh(\accel*\eta)});
}
% Plot lines of constant $\eta$
\foreach \eta in {1/8,1/4,0.37,1/2,0.7,0.9,1.2}
{
\draw[domain=0:16,smooth,variable=\x,scarlet,thick,samples=50]
plot ({\x},{(\x - \xinit + \accelinv)*tanh(\accel*\eta});
\draw[domain=0:16,smooth,variable=\x,scarlet,thick,samples=50]
plot ({\x},{-(\x - \xinit + \accelinv)*tanh(\accel*\eta});
}
\end{scope} % end SCOPE
% Labeling
\node[inner sep=0pt,rotate=0,label={right:$\eta = 1/8$}] at (16.1,2.0) {};
\node[inner sep=0pt,rotate=0,label={right:$\eta = 1/4$}] at (16.1,3.9) {};
\node[inner sep=0pt,rotate=0,label={right:$\eta = 0.37$}] at (16.1,5.6) {};
\node[inner sep=0pt,rotate=0,label={right:$\eta = 1/2$}] at (16.1,7.4) {};
\node[inner sep=0pt,rotate=0,label={right:$\eta = 0.7$}] at (16.1,9.6) {};
\node[inner sep=0pt,rotate=0,label={right:$\eta = 0.9$}] at (16.1,11.4) {};
\node[inner sep=0pt,rotate=0,label={above right:$\alpha = 1, x_0 = 1/\alpha$}] at (2,10.0) {};
\end{tikzpicture}
\end{document}
@jamesamiller
Copy link
Author

An example.
fig-accelCoor

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