diff options
Diffstat (limited to '')
-rw-r--r-- | .gitlab-ci.yml | 17 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | rnv/disc-five.tex | 302 | ||||
-rw-r--r-- | rnv/heidelberg.tex (renamed from heidelberg.tex) | 2 | ||||
-rw-r--r-- | rnv/times.csv | 75 |
6 files changed, 396 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e134e9..95c50eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,25 +6,28 @@ build-pdf: stage: build-pdf image: registry.gitlab.com/containers.ada/tectonic script: - - "set -eux" - - "tectonic heidelberg.tex" + - "tectonic rnv/heidelberg.tex" + - "tectonic rnv/disc-five.tex" artifacts: paths: - - heidelberg.pdf + - rnv/heidelberg.pdf + - rnv/disc-five.pdf rules: - changes: - - "*.tex" + - "**.tex" - ".gitlab-ci.yml" build-svg: stage: build-svg image: registry.gitlab.com/containers.ada/pdf2svg script: - - "pdf2svg heidelberg.pdf heidelberg.svg" + - "pdf2svg rnv/heidelberg.pdf rnv/heidelberg.svg" + - "pdf2svg rnv/disc-five.pdf rnv/disc-five.svg" artifacts: paths: - - heidelberg.svg + - rnv/heidelberg.svg + - rnv/disc-five.svg rules: - changes: - - "*.tex" + - "**.tex" - ".gitlab-ci.yml" @@ -2,4 +2,10 @@ Some line maps I drew in TeX -<img src="https://gitlab.com/ada.loveless/tex-networks/-/jobs/artifacts/main/raw/heidelberg.svg?job=build-svg" alt="A network map of the Heidelberg Tram network" width=100%></img> +## Heidelberg + +<img src="https://gitlab.com/ada.loveless/tex-networks/-/jobs/artifacts/main/raw/rnv/heidelberg.svg?job=build-svg" alt="A network map of the Heidelberg Tram network" width=100%></img> + +## RNV 5 as a circle + +<img src="https://gitlab.com/ada.loveless/tex-networks/-/jobs/artifacts/main/raw/rnv/disc-five.svg?job=build-svg" alt="A network map of the Heidelberg Tram network" width=100%></img> @@ -24,6 +24,7 @@ in pkgs.mkShell { packages = with pkgs; [ + tectonic ]; buildInputs = [ texpkgs diff --git a/rnv/disc-five.tex b/rnv/disc-five.tex new file mode 100644 index 0000000..6db3267 --- /dev/null +++ b/rnv/disc-five.tex @@ -0,0 +1,302 @@ +\documentclass[tikz]{standalone} + +\usepackage{tikz} +\usepackage{pgfplots} +\usepgfplotslibrary{polar} +\usetikzlibrary{shapes.geometric} + +\usepackage{fontspec} +\setmainfont{Atkinson Hyperlegible} + +\begin{document} + +\def\circleradius{7.5} + +\def\minute{2.6277} +\pgfmathparse{\minute/2} +\let\halfminute\pgfmathresult + +\pgfplotstableread[col sep=comma]{times.csv}\data +\definecolor{one}{RGB}{243,155,154} +\definecolor{two}{RGB}{176,0,68} +\definecolor{three}{RGB}{213,173,0} +\definecolor{four}{RGB}{227,0,11} +\definecolor{five}{RGB}{0,150,94} +\definecolor{six}{RGB}{149,107,37} +\definecolor{seven}{RGB}{255,204,0} +\definecolor{fifteen}{RGB}{247,171,99} +\definecolor{sixteen}{RGB}{94,107,175} +\definecolor{twentyone}{RGB}{227,0,11} +\definecolor{twentytwo}{RGB}{253,195,0} +\definecolor{twentythree}{RGB}{228,142,0} +\definecolor{twentyfour}{RGB}{140,29,117} +\definecolor{twentysix}{RGB}{243,155,154} + +\def\arcbetween#1#2#3#4{% + \pgfplotstablegetelem{#1}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angleone\pgfmathresult + \pgfplotstablegetelem{#2}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angletwo\pgfmathresult + \pgfmathparse{\circleradius+0.1*#3} + \let\radius\pgfmathresult + \draw[ultra thick, color=#4] (\angleone:\radius) arc [start angle=\angleone, end angle=\angletwo, x radius=\radius, y radius=\radius]; +} + +\def\stop#1#2#3{% + \pgfplotstablegetelem{#1}{Stop}\of\data + \let\name\pgfplotsretval + \pgfplotstablegetelem{#1}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angle\pgfmathresult + \pgfmathparse{#2*0.1} + \let\width\pgfmathresult + \pgfmathparse{\circleradius+(#3*0.1)} + \let\radius\pgfmathresult + \node[anchor=east, rotate=\angle] at (\angle:\circleradius-0.5+0.05) {\footnotesize\name}; + % \draw[thick, fill=white] (\angle:5cm) circle [radius=0.5ex] {}; + \draw[rounded corners=0.05cm, thick, fill=white, rotate=\angle, shift={(-0.05, -0.05)}] (0:\radius) rectangle ++(\width,0.1cm); +} + +\def\legend#1{% + % Circle for the legend + \draw circle [radius=0.15cm]; + \draw[draw, color=black] circle [radius=\circleradius+2]; + \draw[thick] circle [radius=#1]; + \pgfmathparse{#1+0.2} + \let\rmajor\pgfmathresult + \pgfmathparse{#1+0.1} + \let\rminor\pgfmathresult + % Major ticks clockwise + \draw[thick] (90:#1) -- (90:\rmajor); + \foreach \i in {5,10,...,65} { + \pgfmathparse{90-\i * 2.6277} + \let\angle\pgfmathresult + \draw[thick] (\angle:#1) -- (\angle:\rmajor); + \node[anchor=west, rotate=\angle] at (\angle:\rmajor) {\scriptsize \i~min}; + } + % Minor ticks clockwise + \foreach \i in {1,2,...,65} { + \pgfmathparse{90-\i * 2.6277} + \let\angle\pgfmathresult + \draw[thick] (\angle:#1) -- (\angle:\rminor); + } + % Major ticks anti-clockwise + \foreach \i in {5,10,...,65} { + \pgfmathparse{90+\i * 2.6277} + \let\angle\pgfmathresult + \draw[thick] (\angle:#1) -- (\angle:\rmajor); + \node[anchor=east, rotate=\angle-180] at (\angle:\rmajor) {\scriptsize \i~min}; + } + % Minor ticks anti-clockwise + \foreach \i in {1,2,...,65} { + \pgfmathparse{90+\i * 2.6277} + \let\angle\pgfmathresult + \draw[thick] (\angle:#1) -- (\angle:\rminor); + } + % Extra marks + \draw[thick] (-90:#1) -- (-90:\rmajor); + \node [isosceles triangle, anchor=east, fill=red, rotate=-90] (tringle) at (90:#1){}; + \node[anchor=south, rotate=0, color=red] at (tringle.west) {\footnotesize 0~min}; +} + +\def\bendin#1#2#3#4#5{% + % First angle + \pgfplotstablegetelem{#1}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angletwo\pgfmathresult + % Second angle + \pgfmathparse{\pgfplotsretval-30.975+#2*\halfminute} + \let\anglethree\pgfmathresult + \pgfmathparse{\circleradius+#3*0.1} + \let\radius\pgfmathresult + \draw[ultra thick, color=#5, rounded corners=#4*.5ex] + (\angletwo:\radius) -- (\anglethree:\radius) -- (\anglethree:\circleradius-0.5) + ; +} + +\def\bendout#1#2#3#4#5{% + % First angle + \pgfplotstablegetelem{#1}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angletwo\pgfmathresult + % Second angle + \pgfmathparse{\pgfplotsretval-30.975+#2*\halfminute} + \let\anglethree\pgfmathresult + \pgfmathparse{\circleradius+#3*0.1} + \let\radius\pgfmathresult + % + \draw[ultra thick, color=#5, rounded corners=#4*.5ex] + (\angletwo:\radius) -- (\anglethree:\radius) -- (\anglethree:\circleradius+0.5) + ; +} +\def\crossing#1#2#3#4{% + \pgfplotstablegetelem{#1}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angleone\pgfmathresult + \pgfplotstablegetelem{#2}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975} + \let\angletwo\pgfmathresult + \pgfmathparse{(\angleone+\angletwo)/2+#3} + \let\angle\pgfmathresult + \draw[ultra thick, color=#4] (\angle:\circleradius-0.5) -- (\angle:\circleradius+0.5); +} + +\def\citybetween#1#2#3{% + \pgfplotstablegetelem{#1}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975+\halfminute} + \let\angleone\pgfmathresult + \pgfplotstablegetelem{#2}{Time Angle}\of\data + \pgfmathparse{\pgfplotsretval-30.975-\halfminute} + \let\angletwo\pgfmathresult + \pgfmathparse{2} + \let\radius\pgfmathresult + \draw[very thick, color=#3] (\angleone:\radius) arc [start angle=\angleone, end angle=\angletwo, x radius=\radius, y radius=\radius]; +} + +\begin{tikzpicture} + % Circle for the line + \draw[ultra thick, color=five] circle [radius=\circleradius]; + \crossing{18}{19}{-0.6*\halfminute}{five} + \crossing{18}{19}{0}{two} + \crossing{18}{19}{0.6*\halfminute}{seven} + \crossing{28}{29}{0}{five} + % Other lines + % Mannheim + \bendout{15}{-1}{1}{1}{six} + \bendout{20}{1}{1}{1}{seven} + \arcbetween{20}{24}{1}{seven} % 7 (again) + \arcbetween{20}{25}{-1}{fifteen} % 15 (again) + \bendin{20}{2.8}{-1}{4}{fifteen} + \arcbetween{20}{25}{-2}{one} % 1 + \bendin{20}{2.2}{-2}{3}{one} + \arcbetween{20}{22}{-3}{four} + \bendin{20}{1.6}{-3}{2}{four} + \arcbetween{20}{22}{-4}{three} + \bendin{20}{1}{-4}{1}{three} + % Paradeplatz + \arcbetween{22}{25}{2}{six} % 6 + \arcbetween{24}{26}{-3}{four} % 4 + \bendout{22}{-1.0}{-3}{2}{four} + \bendout{22}{-1.3}{-4}{2}{three} + \bendout{22}{-0.7}{3}{1}{two} + \bendin{22}{1.6}{3}{2}{two} + \bendin{22}{1}{2}{1}{six} + \bendin{24}{-1}{1}{1}{seven} + \bendin{24}{1}{-3}{1}{four} + % Main station + \bendin{25}{-1.4}{-2}{1}{one} + \arcbetween{25}{26}{1}{three} + \bendin{25}{-2}{2}{2}{six} + \bendin{26}{2}{2}{2}{six} + \bendout{26}{-0.5}{2}{1}{six} + \bendout{26}{-0.8}{1}{1}{three} + \bendout{26}{-1.1}{-3}{1}{four} + \arcbetween{27}{30}{-1}{two} + \bendout{27}{0.6}{-1}{1}{two} + \arcbetween{28}{30}{-2}{seven} + \bendout{28}{1}{-2}{1}{seven} + % Universitätsklinikum + \bendin{30}{-1}{-2}{1}{seven} + \bendin{30}{-1.6}{-1}{2}{two} + \bendout{30}{1.6}{1}{2}{fifteen} + \bendout{30}{1}{2}{1}{four} + \arcbetween{30}{36}{1}{fifteen} + \arcbetween{30}{32}{2}{four} + \bendout{32}{-1}{2}{1}{four} + \bendin{36}{-1.4}{1}{2}{fifteen} + \bendin{36}{-0.8}{0}{1}{five} + \bendout{37}{-1}{1}{1}{sixteen} + % Heidelberg + % Hans-Thoma Pl. + \arcbetween{63}{64}{-1}{twentyfour} % 24 + \bendin{64}{-1}{-2}{1}{twentyone} % 21 + \bendin{64}{-1.6}{-1}{2}{twentyfour} % 24 + \arcbetween{63}{69}{1}{twentysix} % 26 + % Bismarckplatz + \arcbetween{70}{73}{1}{twentyone} % 21 + \bendin{69}{-1.7}{1}{1}{twentysix} % 26 towards kirchheim + \bendin{70}{1.7}{1}{1}{twentyone} % 21 towards hans-thoma (north) + \bendin{73}{-0.8}{1}{1}{twentyone} % 21 towards hans-thoma (south) + \arcbetween{69}{71}{2}{twentythree} % 23 + \arcbetween{69}{71}{3}{twentytwo} % 22 + % Stadtbücherei + \bendout{71}{-0.7}{3}{1}{twentytwo} % 22 towards eppelheim + \bendout{71}{-1}{2}{1}{twentythree} % 23 towards leimen + \bendout{72}{0.7}{2}{1}{twentyfour} + \arcbetween{72}{73}{2}{twentyfour} % 24 (again) + \bendin{73}{-1.4}{2}{2}{twentyfour} + % \arcbetween{64}{64}{1}{red} % 21 (again) + % Stops + \foreach \i in {1,...,14} { \stop{\i}{1}{0} } + \stop{15}{2}{0} + \foreach \i in {16,...,19} { \stop{\i}{1}{0} } + \foreach \i in {20,...,21} { \stop{\i}{6}{-4} } + \stop{22}{8}{-4} + \stop{23}{5}{-2} + \stop{24}{6}{-3} + \stop{25}{6}{-3} + % \foreach \i in {24,...,25} { \stop{\i}{4}{-1} } + % \stop{25}{4}{-2} + \stop{26}{6}{-3} + \stop{27}{2}{-1} + \stop{28}{3}{-2} + \stop{29}{3}{-2} + \stop{30}{5}{-2} + \foreach \i in {31,...,32} { \stop{\i}{3}{0} } + \foreach \i in {33,...,35} { \stop{\i}{2}{0} } + \stop{36}{2}{0} + \stop{37}{2}{0} + \foreach \i in {38,...,62} { \stop{\i}{1}{0} } + \stop{63}{3}{-1} + \stop{64}{4}{-2} + \foreach \i in {65,...,68} { \stop{\i}{2}{0} } + \stop{69}{4}{0} + \stop{70}{4}{0} + \stop{71}{4}{0} + \stop{72}{3}{0} + \stop{73}{3}{0} + % \draw[very thick, color=black] (-338.4202:2cm) arc [start angle=-338.4202, delta angle=-42.6014-30, x radius=2cm, y radius=2cm]; + % \citybetween{63}{9}{black}{} + % \citybetween{16}{38}{black}{} + % \citybetween{39}{43}{black}{} + % \citybetween{44}{50}{black}{} + % \citybetween{57}{59}{black}{} + % \citybetween{60}{62}{black}{} + \pgfmathparse{\circleradius-0.5} + \draw[color=black] circle [radius=\pgfmathresult]; + \pgfmathparse{\circleradius+0.5} + \draw[color=black] circle [radius=\pgfmathresult]; + \legend{\circleradius+0.6} +\end{tikzpicture} + +\begin{tikzpicture} + \legend{\circleradius+0.6} +\end{tikzpicture} + +% \begin{tikzpicture} +% \begin{polaraxis}[ +% xtick=data, +% ytick=\empty, +% xticklabels from table={\data}{Stop}, +% xticklabel style={ +% sloped like x axis={ +% allow upside down=true, +% % execute for upside down=\tikzset{right}, +% % reset nontranslations=false, +% }, +% left, +% font=\scriptsize, +% rotate=60, +% }, +% xmin=-360, +% xmax=0, +% rotate=-30, +% ] +% \addplot[draw=none, mark=none] table [x=Time Angle, y=Index] {\data}; +% \end{polaraxis} +% \end{tikzpicture} + +\end{document} +% vim: conceallevel=0 nospell diff --git a/heidelberg.tex b/rnv/heidelberg.tex index 433fd74..b4a33f8 100644 --- a/heidelberg.tex +++ b/rnv/heidelberg.tex @@ -27,7 +27,7 @@ \definecolor{twentyfour}{RGB}{140,29,117} \definecolor{twentysix}{RGB}{243,155,154} -\input{shapes.tex} +\input{../shapes.tex} \begin{document} \begin{center} diff --git a/rnv/times.csv b/rnv/times.csv new file mode 100644 index 0000000..faf063e --- /dev/null +++ b/rnv/times.csv @@ -0,0 +1,75 @@ +Index,Stop,Time 1,Time 2,Time 3,Time 4,Time Minutes,Time Angle +1,Heidelberg Hauptbahnhof,0,,,,0,-0 +1,Gneisenaustraße Süd,1,,,,1,-2.62773722627737 +1,Berufsschule,2,,,,2,-5.25547445255474 +1,Ochsenkopf,3,,,,3,-7.88321167883212 +1,SRH Campus,4,,,,4,-10.5109489051095 +1,Wieblingen Mitte,7,,,,7,-18.3941605839416 +1,Wieblingen Taubenfeld,8,,,,8,-21.021897810219 +1,Edingen Bahnhof,11,,,,11,-28.9051094890511 +1,Edingen West,15,,,,15,-39.4160583941606 +1,Neu-Edingen Gewerbegebiet,17,,,,17,-44.6715328467153 +1,Seckenheim OEG-Bahnhof,21,,,,21,-55.1824817518248 +1,Seckenheim Rathaus,23,,,,23,-60.4379562043796 +1,Deutscher Hof,24,,,,24,-63.0656934306569 +1,Pforzheimer Straße,26,,,,26,-68.3211678832117 +1,Duale Hochschule,27,,,,27,-70.9489051094891 +1,Neuostheim,30,,,,30,-78.8321167883212 +1,Holbeinstraße,31,,,,31,-81.4598540145985 +1,Fernmeldeturm,33,,,,33,-86.7153284671533 +1,Lessingstraße,34,,,,34,-89.3430656934307 +1,Collini-Center,37,,,,37,-97.2262773722628 +1,Abendakademie,40,,,,40,-105.109489051095 +1,Mannheim Marktplatz,41,,,,41,-107.737226277372 +1,Paradeplatz,43,,,,43,-112.992700729927 +1,Mannheim Schloss,44,,,,44,-115.620437956204 +1,Universität,46,,,,46,-120.875912408759 +1,Mannheim Hauptbahnhof,48,0,,,48,-126.131386861314 +1,Kunsthalle,50,2,,,50,-131.386861313869 +1,Rosengarten,52,3,,,51,-134.014598540146 +1,Nationaltheater,,5,,,53,-139.270072992701 +1,Theresienkrankenhaus,,6,,,54,-141.897810218978 +1,Universitätsklinikum,,8,,,56,-147.153284671533 +1,Lange Rötterstraße,,9,,,57,-149.78102189781 +1,Bonifatiuskirche,,10,,,58,-152.408759124088 +1,Exerzierplatz,,11,,,59,-155.036496350365 +1,Käfertal Süd,,13,,,61,-160.29197080292 +1,Mannheimer Straße,,14,,,62,-162.919708029197 +1,Käfertal Bahnhof,,19,,,67,-176.058394160584 +1,Bensheimer Straße,,20,,,68,-178.686131386861 +1,Platz der Freundschaft,,21,,,69,-181.313868613139 +1,Viernheim Tivoli,,24,,,72,-189.197080291971 +1,Viernheim Kapellenberg,,25,,,73,-191.824817518248 +1,Viernheim Bahnhof,,29,,,77,-202.335766423358 +1,Viernheim Ost,,30,,,78,-204.963503649635 +1,Viernheim Walter-Gropius-Allee,,31,,,79,-207.591240875912 +1,Weinheim Freiburger Straße,,34,,,82,-215.474452554745 +1,Blumenstraße,,35,,,83,-218.102189781022 +1,Stahlbad,,36,,,84,-220.729927007299 +1,Händelstraße,,38,,,86,-225.985401459854 +1,Weinheim Hauptbahnhof,,41,,,89,-233.868613138686 +1,Weinheim Alter OEG-Bahnhof,,43,0,,91,-239.124087591241 +1,Rosenbrunnen,,,1,,92,-241.751824817518 +1,Lützelsachsen Pilgerhaus,,,2,,93,-244.379562043796 +1,Lützelsachsen Bergstraße,,,4,,95,-249.63503649635 +1,Hohensachsen,,,5,,96,-252.262773722628 +1,Großsachsen Bahnhof,,,7,,98,-257.518248175182 +1,Großsachsen Süd,,,8,,99,-260.14598540146 +1,Leutershausen Bahnhof,,,11,,102,-268.029197080292 +1,Zentgrafenstraße,,,14,,105,-275.912408759124 +1,Schriesheim Bahnhof,,,18,,109,-286.423357664234 +1,Schriesheim Süd,,,19,,110,-289.051094890511 +1,Dossenheim Nord,,,21,,112,-294.306569343066 +1,Dossenheim Bahnhof,,,23,,114,-299.56204379562 +1,Dossenheim Süd,,,24,,115,-302.189781021898 +1,Burgstraße,,,26,,117,-307.445255474453 +1,Hans-Thoma-Platz,,,30,,121,-317.956204379562 +1,Kapellenweg,,,32,,123,-323.211678832117 +1,Blumenthalstraße,,,33,,124,-325.839416058394 +1,Kußmaulstraße,,,34,,125,-328.467153284672 +1,Brückenstraße,,,35,,126,-331.094890510949 +1,Bismarckplatz,,,39,0,130,-341.605839416058 +1,Seegarten,,,41,2,132,-346.861313868613 +1,Stadtbücherei,,,42,3,133,-349.489051094891 +1,Stadtwerke,,,,4,134,-352.116788321168 +1,Heidelberg Hauptbahnhof,,,,7,137,-360 |