edugame-railway-operation/material/signals.tex

103 lines
3.6 KiB
TeX
Raw Normal View History

%!TEX TS-program = pdflatexmk
% Copyright 2018 RailToolKit (Attribution 4.0 International, CC-BY 4.0)
% You are free to copy and redistribute the material in any medium or format. You are free to remix, transform, and build upon the material for any purpose, even commercially. You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. No warranties are given.
\documentclass{beamer}
\usepackage[
size=a4,
]{beamerposter}
\beamertemplatenavigationsymbolsempty
\def\ROOT{./..}
\input{\ROOT/src/material_header.tex}
\input{\ROOT/src/colors.tex}
% \input{\ROOT/src/hyperref.tex}
\tikzset{
pics/distant_signal_go/.style args={#1}{
code={
\draw[loosely dashdotted] (0,1) -- ( 0,0) -- ++(8,0) -- ++(0,1);
\draw[line width=4pt] (0,-0.5) -- ++(0,-2);
\draw[line width=4pt] (0,-1.5) -- ++(4, 0);
\draw[line width=4pt,fill=base1] (4,-0.5) arc (90:270:1) -- ++(1.2,0) -- ++(0,2)-- cycle;
\draw[fill=#1] (4,-1.5) circle (0.8);
\draw[double] (3.2,-1.5) -- ++(1.6,0);
}
},
pics/distant_signal_go/.default=signalgreen,
}
\tikzset{
pics/main_signal_go/.style args={#1}{
code={
\draw[loosely dashdotted] (0,1) -- ( 0,0) -- ++(8,0) -- ++(0,1);
\draw[line width=4pt] (7.5,-0.5) -- ++(1,0);
\fill (7.8,-0.5) circle (0.2);
\fill (8.2,-0.5) circle (0.2);
\draw[line width=4pt] (0,-0.5) -- ++(0,-2);
\draw[line width=4pt] (0,-1.5) -- ++(4, 0);
\draw[line width=4pt,fill=base1] (4,-0.5) -- ++(2,0) arc (-90:-270:-1) -- ++(-2,0) -- cycle;
\draw[fill=#1] (6,-1.5) circle (0.8);
\draw[double] (5.2,-1.5) -- ++(1.6,0);
}
},
pics/main_signal_go/.default=signalgreen,
}
\tikzset{
pics/distant_signal_stop/.style args={#1}{
code={
\draw[loosely dashdotted] (0,1) -- ( 0,0) -- ++(8,0) -- ++(0,1);
\draw[line width=4pt] (0,-0.5) -- ++(0,-2);
\draw[line width=4pt] (0,-1.5) -- ++(4, 0);
\draw[line width=4pt,fill=base1] (4,-0.5) arc (90:270:1) -- ++(1.2,0) -- ++(0,2)-- cycle;
\draw[fill=#1] (4,-1.5) circle (0.8);
\draw[double] (3.44,-0.94) -- ++(1.12,-1.12);
}
},
pics/distant_signal_stop/.default=signalyellow,
}
\tikzset{
pics/main_signal_stop/.style args={#1}{
code={
\draw[loosely dashdotted] (0,1) -- ( 0,0) -- ++(8,0) -- ++(0,1);
\draw[line width=4pt] (7.5,-0.5) -- ++(1,0);
\fill (7.8,-0.5) circle (0.2);
\fill (8.2,-0.5) circle (0.2);
\draw[line width=4pt] (0,-0.5) -- ++(0,-2);
\draw[line width=4pt] (0,-1.5) -- ++(4, 0);
\draw[line width=4pt,fill=base1] (4,-0.5) -- ++(2,0) arc (-90:-270:-1) -- ++(-2,0) -- cycle;
\draw[fill=#1] (6,-1.5) circle (0.8);
\draw[double] (6.0,-0.7) -- ++(0,-1.6);
}
},
pics/main_signal_stop/.default=signalred,
}
\begin{document}
\selectlanguage{ngerman} % currently supported: english, ngerman
\tikzset{every path/.style={ultra thick}}
\begin{frame}
\vfill
\begin{tikzpicture}[font=\sffamily]
\foreach \x in {0,9.5,19}
\foreach \y in {10,15}
\pic at (\x,\y) {main_signal_go};
\foreach \x in {0,9.5,19}
\foreach \y in {0,5}
\pic at (\x,\y) {distant_signal_go};
\end{tikzpicture}
\vfil
\end{frame}
\begin{frame}
\vfill
\begin{tikzpicture}[font=\sffamily]
\foreach \x in {0,9.5,19}
\foreach \y in {10,15}
\pic at (\x,\y) {distant_signal_stop};
\foreach \x in {0,9.5,19}
\foreach \y in {0,5}
\pic at (\x,\y) {main_signal_stop};
\end{tikzpicture}
\vfil
\end{frame}
\end{document}