%% Written by Bill Nettles circa 2014
\documentclass{article}
\usepackage{tikz}
\usepackage{nopageno}
\usepackage{geometry}
\geometry{margin=0.75in}
\begin{document}
Doppler shift grids, using the [cm=\{cosh($\beta$),sinh($\beta$),sinh($\beta$),cosh($\beta$),(coord)\}] transfomation matrix in Tikz, where $\beta$ is the boost of the frame.

\begin{figure}[h!]

\begin{tikzpicture}
\draw[red,step=2](-6.2,-6.2)grid(6.2,6.2) node[right]{$\uparrow$ $ct$}node[above]{$x$ $\rightarrow$};
\draw(-6,6)--(0,0)--(6,6);
\draw[yshift=-0.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-1.cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-1.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-2.0cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-2.5cm](-6,6)--(0,0)--(6,6);

\draw[yshift=-4cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-4.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-5.cm](-6,6)--(0,0)--(6,6);
\foreach \x in {-6,-4,-2,0,2,4,6} {\draw node at (\x,-6.3){\x };};
\foreach \y in {-6,-4,-2,0,2,4,6} {\draw node at (-6.3,\y){\y };};
\end{tikzpicture}
\caption{Light pulse world lines from a source at rest in the reference frame.}
\end{figure}

\begin{figure}

\begin{tikzpicture}[cm={1.031,0.253,.253,1.031,(0,0)}]
\draw[red,step=2](-6.2,-6.2)grid(6.2,6.2);
\draw(-6,6)--(0,0)--(6,6);
\draw[yshift=-0.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-1.cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-1.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-2.0cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-2.5cm](-6,6)--(0,0)--(6,6);

\draw[yshift=-4cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-4.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-5.cm](-6,6)--(0,0)--(6,6);
\foreach \x in {-6,-4,-2,0,2,4,6} {\draw node at (\x,-6.3){\x };};
\foreach \y in {-6,-4,-2,0,2,4,6} {\draw node at (-6.3,\y){\y };};
\draw[dashed,step=2,blue,cm={1.031,-.253,-.253,1.031,(0,0)}](-6,-6)grid(6,6);
\end{tikzpicture}
\caption{Light pulse world lines from a  source resting in  a moving frame (solid), viewed from a different frame (dashed)}

\end{figure}

\begin{figure}
\begin{tikzpicture}[cm={1.031,0.253,.253,1.031,(0,0)}]
%\draw[red,step=2](-6.2,-6.2)grid(6.2,6.2);
\draw(-6,6)--(0,0)--(6,6);
\draw[yshift=-0.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-1.cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-1.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-2.0cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-2.5cm](-6,6)--(0,0)--(6,6);

\draw[yshift=-4cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-4.5cm](-6,6)--(0,0)--(6,6);
\draw[yshift=-5.cm](-6,6)--(0,0)--(6,6);
\draw[step=2,blue,cm={1.031,-.253,-.253,1.031,(0,0)}](-6,-6)grid(6,6);
\foreach \x in {-6,-4,-2,0,2,4,6} {\draw[cm={1.031,-.253,-.253,1.031,(0,0)}] node at (\x,-6.3){\x };};
\foreach \y in {-6,-4,-2,0,2,4,6} {\draw[cm={1.031,-.253,-.253,1.031,(0,0)}] node at (-6.3,\y){\y };};
\end{tikzpicture}
\caption{Light pulse world lines from a source moving with respect to an observer at at rest in the visible reference frame. }
\end{figure}
\end{document}
