Last active
May 20, 2020 16:46
-
-
Save jamesamiller/95ed21a498e4ebd797cf309350d7a188 to your computer and use it in GitHub Desktop.
The worldlines of stars and a rocket in the inertial star frame (special relativity)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[crop=true, border=10pt]{standalone} | |
\usepackage{comment} | |
\begin{comment} | |
:Title: Motion of stars in the accelerated rocket frame | |
:Slug: Rocket frame | |
:Tags: special relativity | |
:Author: J A Miller, UAH Physics & Astronomy, millerja@uah.edu, 2020/05/12 | |
Worldlines of stars and a rocket in the inertial $x$-$t$ frame, with light rays from one of | |
the stars to the rocket worldline. | |
This figure complements that of the view from the accelerated rocket frame: | |
https://gist.github.com/jamesamiller/b2609beb3b353f4dc50a3a42ad152d12 | |
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. | |
\end{comment} | |
\usepackage{tikz} | |
\usetikzlibrary{arrows.meta} | |
\usepackage{pgfplots} | |
\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} | |
% ----------------------- user specifications ------------------------ | |
% proper acceleration | |
\newcommand*{\accel}{1.0} | |
% maximum proper time for the rocket motion | |
\newcommand*{\taumax}{2.95} | |
% calculate the inverse of acceleration | |
\pgfmathsetmacro{\accelinv}{1/\accel} | |
% initial starting point for the rocket | |
\newcommand*{\xinit}{0} % this is $x_0$ | |
% inertial frame location of stars | |
\newcommand*{\xone}{8} | |
\newcommand*{\xtwo}{5} | |
\newcommand*{\xthree}{2} | |
% Set the point style for the proper time ticks | |
\tikzset{ | |
taudot/.style={circle,draw=scarlet!70,fill=scarlet!20,inner sep=1.5pt} | |
} | |
% Maximum t value of the plot | |
\newcommand*{\tmax}{10} | |
% function to find the coordinates of the intersection of the light rays with the | |
% rocket worldline. \a is defined below. | |
\pgfkeys{/pgf/declare function={xint(\a) = 0.5*\a*\a*\accel/(1+\a*\accel);}} | |
\pgfkeys{/pgf/declare function={tint(\a) = 0.5*\a*(2+\a*\accel)/(1+\a*\accel);}} | |
% ------------------------ begin figure ------------------------------ | |
\begin{document} | |
\begin{tikzpicture}[scale=1,domain=-2:9] | |
\tikzstyle{axisarrow} = [-{Latex[inset=0pt,length=7pt]}] | |
% Draw the background grid. | |
\draw [cornflower!30,step=0.2,thin] (-1,-1) grid (9,\tmax); | |
\draw [cornflower!60,step=1.0,thin] (-1,-1) grid (9,\tmax); | |
% Clip everything that falls outside the grid | |
\clip(-1,-1) rectangle (9,\tmax); | |
% Draw Axes | |
\draw[thick,axisarrow] (0,-1) -- (0,\tmax); | |
\node[right,inner sep=0pt] at (0.2,9.7) {$t$}; | |
\draw[thick,axisarrow] (-1,0) -- (9,0); | |
\node[inner sep=0pt] at (8.5,-0.3) {$x$}; | |
% Draw the worldline of the rocket | |
\draw[domain=0:\taumax,smooth,variable=\tau,plum,thick,samples=100,axisarrow] | |
plot ({(\accelinv*cosh(\accel*\tau)-\accelinv+\xinit)},{\accelinv*sinh(\accel*\tau)}); | |
% Add the location at some proper times | |
\foreach \tau in {0,1,1.5,2.0,2.5,2.9} | |
{ | |
\node[taudot] at ({(\accelinv*cosh(\accel*\tau)-\accelinv+\xinit)},{\accelinv*sinh(\accel*\tau)}) {}; | |
} | |
% Worldlines of the stars | |
\draw[thick,black,axisarrow] (\xone,-1) -- (\xone,\tmax); | |
\node[rotate=90,inner sep=0pt] at (\xone-0.3,3.0) {Star 1}; | |
\draw[thick,black,axisarrow] (\xtwo,-1) -- (\xtwo,\tmax); | |
\node[rotate=90,inner sep=0pt] at (\xtwo-0.3,7.0) {Star 2}; | |
\draw[thick,black,axisarrow] (\xthree,-1) -- (\xthree,\tmax); | |
\node[rotate=90,inner sep=0pt] at (\xthree-0.3,6.0) {Star 3}; | |
% Worldlines of the light reaching the rocket from a star | |
\foreach \t in {-4,-3,-2,-1,0,1,2,3,4,5} | |
{ | |
\pgfmathsetmacro{\a}{\xtwo+\t} | |
\draw[thick,scarlet,axisarrow] | |
(\xtwo,\t) -- ({xint(\a)},{tint(\a)}); | |
} | |
% Worldlines of the light from the star after the rocket has gone by | |
\foreach \t in {6,7,8,9} | |
{ | |
\pgfmathsetmacro{\a}{\t-\xtwo} | |
\draw[thick,scarlet,axisarrow] | |
(\xtwo,\t) -- ({7},{7+\a}); | |
} | |
% Asymptote | |
\draw[thick,chameleon] (-\accelinv,0) -- (9,9+\accelinv); | |
\end{tikzpicture} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output from the above code.