From 4c840e7a6529b42a823835d8c289b722639998f0 Mon Sep 17 00:00:00 2001 From: Michael at Laptop Date: Wed, 27 Jul 2016 21:46:38 +0100 Subject: [PATCH] Consolidate therionprotractors --- documents/therionprotractors/Makefile | 12 +- documents/therionprotractors/therionpage.tex | 195 +++++++++++++++++- .../therionprotractors/therionpage500.tex | 27 --- .../therionprotractors/therionprotractor.tex | 189 ----------------- .../therionprotractor500.tex | 189 ----------------- 5 files changed, 196 insertions(+), 416 deletions(-) delete mode 100644 documents/therionprotractors/therionpage500.tex delete mode 100644 documents/therionprotractors/therionprotractor.tex delete mode 100644 documents/therionprotractors/therionprotractor500.tex diff --git a/documents/therionprotractors/Makefile b/documents/therionprotractors/Makefile index 7816ca861..88c4aec8c 100644 --- a/documents/therionprotractors/Makefile +++ b/documents/therionprotractors/Makefile @@ -5,20 +5,12 @@ all: therionpage.pdf therionpage500.pdf #If using linux or macos(?) uncomment this LATEXTOOL=pdflatex -therionpage.pdf: therionpage.tex therionprotractor.tex +therionpage.pdf: therionpage.tex $(LATEXTOOL) therionpage.tex -therionpage500.pdf: therionpage500.tex therionprotractor500.tex - $(LATEXTOOL) therionpage500.tex - cleanpage: rm -f therionpage.aux rm -f therionpage.log rm -f therionpage.pdf -cleanpage500: - rm -f therionpage500.aux - rm -f therionpage500.log - rm -f therionpage500.pdf - -clean: cleanpage cleanpage500 +clean: cleanpage diff --git a/documents/therionprotractors/therionpage.tex b/documents/therionprotractors/therionpage.tex index 21facdf85..9272a1ee3 100644 --- a/documents/therionprotractors/therionpage.tex +++ b/documents/therionprotractors/therionpage.tex @@ -1,11 +1,204 @@ \documentclass[12pt,a4paper]{article} +% Change the scale using the value on line 24, and the size of the divisions on line 27 +% The protractors are 4cm in radius + % packages \usepackage{tikz} \usepackage[outline]{contour} \usepackage{standalone} \usepackage[margin=10mm]{geometry} +\newcommand{\therionprotract}{ +\begin{tikzpicture}[scale=1] + +\contourlength{1.2pt} + +% ******************************************************************************** +% Set the coordinates and dimensions to draw from +% ******************************************************************************** + +% Origin +\coordinate (O) at (0,0); + +% Scale of the protractor, change this to the desired scale +\pgfmathsetmacro{\scaleto}{200} % 1:scaleto + +% Size of the major divisions on the linear scale +\pgfmathsetmacro{\majordivision}{1} % size in meters + +% Size of the text numbers +\newcommand{\textsize}{\tiny} + +% Intrinisc dimensions and conversion factors +\pgfmathsetmacro{\convert}{100} % conversion from meters to centimeters +\pgfmathsetmacro{\mintick}{0.1} % size in centimeters +\pgfmathsetmacro{\majtick}{0.2} % size in centimeters +\pgfmathsetmacro{\minradii}{0.5} % fractional radius where dotted radial lines start +\pgfmathsetmacro{\minradiiend}{1-\minradii} % remainder + +% Size and scale of the drawing +\pgfmathsetmacro{\rad}{4} % size on page in cm +\pgfmathsetmacro{\majdiv}{\majordivision*\convert/\scaleto} % size on page in cm +\pgfmathsetmacro{\mindiv}{0.5*\majdiv} % size on page in cm + +% Slightly reduced radii for the scale bar +\pgfmathsetmacro{\radscale}{\rad-\mindiv} + +% Numbers for labelling +\pgfmathsetmacro{\radius}{\rad*\scaleto/\convert} % size in meters +\pgfmathsetmacro{\minordivision}{0.5*\majordivision} % size in meters + + +% ******************************************************************************** +% Draw the foreshortening lines +% ******************************************************************************** + +% Vertical lines +\foreach \var in {0,\mindiv,...,\radscale} +{ + \draw[gray] (O) ++ (\var,0) -- ++ (0,\rad); + \draw[gray] (O) ++ (-\var,0) -- ++ (0,\rad); +} + +% White out the excess length +\draw[thick,white,fill=white] (O) ++ (\rad,0) arc(0:180:\rad) -- ++ (0,\rad) -- ++ (2*\rad,0) -- cycle; + + +% ******************************************************************************** +% Draw the circumcircles +% ******************************************************************************** + +\foreach \var in {0,\mindiv,...,\rad} +{ + \draw[gray] (O) ++ (\var,0) arc (0:180:\var); +} + + +% ******************************************************************************** +% Draw the radii +% ******************************************************************************** + +\foreach \theta in {10,40,...,160} +{ + \draw[red] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); +} + +\foreach \theta in {20,50,...,170} +{ + \draw[blue] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); +} + +\foreach \theta in {30,60,...,150} +{ + \draw[black] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); +} + +\foreach \theta in {5,15,...,175} +{ + \draw[black,dotted] (O) ++ (\theta:\minradii*\rad) -- ++ (\theta:\minradiiend*\rad); +} + + +% ******************************************************************************** +% Draw the angular scale +% ******************************************************************************** + +\foreach \theta in {1,2,...,179} +{ + \draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\mintick); +} + +\foreach \theta in {5,10,...,175} +{ + \draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick); +} + + +% ******************************************************************************** +% Draw the linear scale +% ******************************************************************************** + + +\foreach \var in {0,\mindiv,...,\radscale} +{ + \draw[black,thick] (O) ++ (\var,0) -- ++ (0,\mintick); + \draw[black,thick] (O) ++ (-\var,0) -- ++ (0,\mintick); +} + +\foreach \var in {0,\majdiv,...,\radscale} +{ + \draw[black,thick] (O) ++ (\var,0) -- ++ (0,\majtick); + \draw[black,thick] (O) ++ (-\var,0) -- ++ (0,\majtick); +} + + + +% ******************************************************************************** +% Draw the outline +% ******************************************************************************** + +\draw[black,thick] (O) ++ (\rad,0) arc (0:180:\rad) -- cycle; +\draw[black,thick] (O) -- ++ (0,\majtick); + + +% ******************************************************************************** +% Draw the angle numbers +% ******************************************************************************** + +\foreach \theta in {10,20,...,80} +{ + \pgfmathsetmacro{\thetaopposite}{\theta+180} + + \draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=90,text=black] { + \textsize + \begin{tabular}{c} + \contour{white}{\pgfmathprintnumber{\theta}}\\ + \contour{white}{\pgfmathprintnumber{\thetaopposite}} + \end{tabular} + }; +} + +\foreach \theta in {90,100,...,170} +{ + \pgfmathsetmacro{\thetaopposite}{\theta+180} + + \draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=-90,text=black] { + \textsize + \begin{tabular}{c} + \contour{white}{\pgfmathprintnumber{\theta}}\\ + \contour{white}{\pgfmathprintnumber{\thetaopposite}} + \end{tabular} + }; +}; + + +% ******************************************************************************** +% Draw the linear numbers +% ******************************************************************************** + +\pgfmathsetmacro{\labmax}{\radius-\majordivision} +\pgfmathsetmacro{\labsecond}{\majordivision+\majordivision} + +\foreach \var in {\majordivision,\labsecond,...,\labmax} +{ + \pgfmathsetmacro{\varpos}{\var*\convert/\scaleto} + + \draw[black,thick] (O) ++ (\varpos,0) -- ++ (0,\mintick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}}; + \draw[black,thick] (O) ++ (-\varpos,0) -- ++ (0,\mintick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}}; +} + + +% ******************************************************************************** +% Draw the scale number +% ******************************************************************************** + +\draw[black] (O) ++ (0,\rad/3) -- ++ (0,\rad/3) node [midway,anchor=center,sloped,text=black] {\contour{white}{\textsize $1$:\pgfmathprintnumber{\scaleto}}}; + + +\end{tikzpicture} +} + \begin{document} \begin{figure} \centering @@ -18,7 +211,7 @@ { \foreach \yval in {1,2,...,6} { - \node at (\xval*\xdist,\yval*\ydist) {\input{therionprotractor.tex}}; + \node at (\xval*\xdist,\yval*\ydist) {\therionprotract}; } } diff --git a/documents/therionprotractors/therionpage500.tex b/documents/therionprotractors/therionpage500.tex deleted file mode 100644 index 6a2ad27c5..000000000 --- a/documents/therionprotractors/therionpage500.tex +++ /dev/null @@ -1,27 +0,0 @@ -\documentclass[12pt,a4paper]{article} - -% packages -\usepackage{tikz} -\usepackage[outline]{contour} -\usepackage{standalone} -\usepackage[margin=10mm]{geometry} - -\begin{document} -\begin{figure} -\centering -\begin{tikzpicture} - -\pgfmathsetmacro{\xdist}{8.5} -\pgfmathsetmacro{\ydist}{4.5} - -\foreach \xval in {1,2} -{ - \foreach \yval in {1,2,...,6} - { - \node at (\xval*\xdist,\yval*\ydist) {\input{therionprotractor500.tex}}; - } -} - -\end{tikzpicture} -\end{figure} -\end{document} \ No newline at end of file diff --git a/documents/therionprotractors/therionprotractor.tex b/documents/therionprotractors/therionprotractor.tex deleted file mode 100644 index 5e2541b24..000000000 --- a/documents/therionprotractors/therionprotractor.tex +++ /dev/null @@ -1,189 +0,0 @@ -% ******************************************************************************** -% Creates a therion protractor of set size and scale -% ******************************************************************************** - -\documentclass[12pt,border=0pt]{standalone} - -% packages -\usepackage{tikz} -\usepackage[outline]{contour} - -\begin{document} -\begin{tikzpicture}[scale=1] - -\contourlength{1.2pt} - -% ******************************************************************************** -% Set the coordinates and dimensions to draw from -% ******************************************************************************** - -% Origin -\coordinate (O) at (0,0); - -% Size and scale of the protractor -\pgfmathsetmacro{\scaleto}{250} % 1:scaleto -\pgfmathsetmacro{\radius}{10} % size in meters -\pgfmathsetmacro{\majordivision}{1} % size in meters -\pgfmathsetmacro{\minordivision}{0.5} % size in meters - -% Size of the text numbers -\newcommand{\textsize}{\tiny} - -% Intrinisc dimensions and conversion factors -\pgfmathsetmacro{\convert}{100} % conversion from meters to centimeters -\pgfmathsetmacro{\mintick}{0.1} % size in centimeters -\pgfmathsetmacro{\majtick}{0.2} % size in centimeters -\pgfmathsetmacro{\minradii}{0.5} % fractional radius where dotted radial lines start -\pgfmathsetmacro{\minradiiend}{1-\minradii} % remainder - -% Size and scale of the drawing -\pgfmathsetmacro{\rad}{\radius*\convert/\scaleto} -\pgfmathsetmacro{\majdiv}{\majordivision*\convert/\scaleto} -\pgfmathsetmacro{\mindiv}{\minordivision*\convert/\scaleto} - -% Slightly reduced radii for the scale bar -\pgfmathsetmacro{\radscale}{\rad-\mindiv} - - -% ******************************************************************************** -% Draw the foreshortening lines -% ******************************************************************************** - -% Vertical lines -\foreach \var in {0,\mindiv,...,\radscale} -{ - \draw[gray] (O) ++ (\var,0) -- ++ (0,\rad); - \draw[gray] (O) ++ (-\var,0) -- ++ (0,\rad); -} - -% White out the excess length -\draw[thick,white,fill=white] (O) ++ (\rad,0) arc(0:180:\rad) -- ++ (0,\rad) -- ++ (2*\rad,0) -- cycle; - - -% ******************************************************************************** -% Draw the circumcircles -% ******************************************************************************** - -\foreach \var in {0,\mindiv,...,\rad} -{ - \draw[gray] (O) ++ (\var,0) arc (0:180:\var); -} - - -% ******************************************************************************** -% Draw the radii -% ******************************************************************************** - -\foreach \theta in {10,40,...,160} -{ - \draw[red] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); -} - -\foreach \theta in {20,50,...,170} -{ - \draw[blue] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); -} - -\foreach \theta in {30,60,...,150} -{ - \draw[black] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); -} - -\foreach \theta in {5,15,...,175} -{ - \draw[black,dotted] (O) ++ (\theta:\minradii*\rad) -- ++ (\theta:\minradiiend*\rad); -} - - -% ******************************************************************************** -% Draw the angular scale -% ******************************************************************************** - -\foreach \theta in {1,2,...,179} -{ - \draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\mintick); -} - -\foreach \theta in {5,10,...,175} -{ - \draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick); -} - - -% ******************************************************************************** -% Draw the linear scale -% ******************************************************************************** - - -\foreach \var in {0,\mindiv,...,\radscale} -{ - \draw[black,thick] (O) ++ (\var,0) -- ++ (0,\mintick); - \draw[black,thick] (O) ++ (-\var,0) -- ++ (0,\mintick); -} - - - -% ******************************************************************************** -% Draw the outline -% ******************************************************************************** - -\draw[black,thick] (O) ++ (\rad,0) arc (0:180:\rad) -- cycle; -\draw[black,thick] (O) -- ++ (0,\majtick); - - -% ******************************************************************************** -% Draw the angle numbers -% ******************************************************************************** - -\foreach \theta in {10,20,...,80} -{ - \pgfmathsetmacro{\thetaopposite}{\theta+180} - - \draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=90,text=black] { - \textsize - \begin{tabular}{c} - \contour{white}{\pgfmathprintnumber{\theta}}\\ - \contour{white}{\pgfmathprintnumber{\thetaopposite}} - \end{tabular} - }; -} - -\foreach \theta in {90,100,...,170} -{ - \pgfmathsetmacro{\thetaopposite}{\theta+180} - - \draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=-90,text=black] { - \textsize - \begin{tabular}{c} - \contour{white}{\pgfmathprintnumber{\theta}}\\ - \contour{white}{\pgfmathprintnumber{\thetaopposite}} - \end{tabular} - }; -}; - - -% ******************************************************************************** -% Draw the linear numbers -% ******************************************************************************** - -\pgfmathsetmacro{\labmax}{\radius-\majordivision} -\pgfmathsetmacro{\labsecond}{\majordivision+\majordivision} - -\foreach \var in {\majordivision,\labsecond,...,\labmax} -{ - \pgfmathsetmacro{\varpos}{\var*\convert/\scaleto} - - \draw[black,thick] (O) ++ (\varpos,0) -- ++ (0,\mintick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}}; - \draw[black,thick] (O) ++ (-\varpos,0) -- ++ (0,\mintick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}}; -} - - -% ******************************************************************************** -% Draw the scale number -% ******************************************************************************** - -\draw[black] (O) ++ (0,\rad/3) -- ++ (0,\rad/3) node [midway,anchor=center,sloped,text=black] {\contour{white}{\textsize $1$:\pgfmathprintnumber{\scaleto}}}; - - -\end{tikzpicture} -\end{document} \ No newline at end of file diff --git a/documents/therionprotractors/therionprotractor500.tex b/documents/therionprotractors/therionprotractor500.tex deleted file mode 100644 index f5b57eca5..000000000 --- a/documents/therionprotractors/therionprotractor500.tex +++ /dev/null @@ -1,189 +0,0 @@ -% ******************************************************************************** -% Creates a therion protractor of set size and scale -% ******************************************************************************** - -\documentclass[12pt,border=0pt]{standalone} - -% packages -\usepackage{tikz} -\usepackage[outline]{contour} - -\begin{document} -\begin{tikzpicture}[scale=1] - -\contourlength{1.2pt} - -% ******************************************************************************** -% Set the coordinates and dimensions to draw from -% ******************************************************************************** - -% Origin -\coordinate (O) at (0,0); - -% Size and scale of the protractor -\pgfmathsetmacro{\scaleto}{500} % 1:scaleto -\pgfmathsetmacro{\radius}{20} % size in meters -\pgfmathsetmacro{\majordivision}{2} % size in meters -\pgfmathsetmacro{\minordivision}{1} % size in meters - -% Size of the text numbers -\newcommand{\textsize}{\tiny} - -% Intrinisc dimensions and conversion factors -\pgfmathsetmacro{\convert}{100} % conversion from meters to centimeters -\pgfmathsetmacro{\mintick}{0.1} % size in centimeters -\pgfmathsetmacro{\majtick}{0.2} % size in centimeters -\pgfmathsetmacro{\minradii}{0.5} % fractional radius where dotted radial lines start -\pgfmathsetmacro{\minradiiend}{1-\minradii} % remainder - -% Size and scale of the drawing -\pgfmathsetmacro{\rad}{\radius*\convert/\scaleto} -\pgfmathsetmacro{\majdiv}{\majordivision*\convert/\scaleto} -\pgfmathsetmacro{\mindiv}{\minordivision*\convert/\scaleto} - -% Slightly reduced radii for the scale bar -\pgfmathsetmacro{\radscale}{\rad-\mindiv} - - -% ******************************************************************************** -% Draw the foreshortening lines -% ******************************************************************************** - -% Vertical lines -\foreach \var in {0,\mindiv,...,\radscale} -{ - \draw[gray] (O) ++ (\var,0) -- ++ (0,\rad); - \draw[gray] (O) ++ (-\var,0) -- ++ (0,\rad); -} - -% White out the excess length -\draw[thick,white,fill=white] (O) ++ (\rad,0) arc(0:180:\rad) -- ++ (0,\rad) -- ++ (2*\rad,0) -- cycle; - - -% ******************************************************************************** -% Draw the circumcircles -% ******************************************************************************** - -\foreach \var in {0,\mindiv,...,\rad} -{ - \draw[gray] (O) ++ (\var,0) arc (0:180:\var); -} - - -% ******************************************************************************** -% Draw the radii -% ******************************************************************************** - -\foreach \theta in {10,40,...,160} -{ - \draw[green] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); -} - -\foreach \theta in {20,50,...,170} -{ - \draw[purple] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); -} - -\foreach \theta in {30,60,...,150} -{ - \draw[black] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale); -} - -\foreach \theta in {5,15,...,175} -{ - \draw[black,dotted] (O) ++ (\theta:\minradii*\rad) -- ++ (\theta:\minradiiend*\rad); -} - - -% ******************************************************************************** -% Draw the angular scale -% ******************************************************************************** - -\foreach \theta in {1,2,...,179} -{ - \draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\mintick); -} - -\foreach \theta in {5,10,...,175} -{ - \draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick); -} - - -% ******************************************************************************** -% Draw the linear scale -% ******************************************************************************** - - -\foreach \var in {0,\mindiv,...,\radscale} -{ - \draw[black,thick] (O) ++ (\var,0) -- ++ (0,\mintick); - \draw[black,thick] (O) ++ (-\var,0) -- ++ (0,\mintick); -} - - - -% ******************************************************************************** -% Draw the outline -% ******************************************************************************** - -\draw[black,thick] (O) ++ (\rad,0) arc (0:180:\rad) -- cycle; -\draw[black,thick] (O) -- ++ (0,\majtick); - - -% ******************************************************************************** -% Draw the angle numbers -% ******************************************************************************** - -\foreach \theta in {10,20,...,80} -{ - \pgfmathsetmacro{\thetaopposite}{\theta+180} - - \draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=90,text=black] { - \textsize - \begin{tabular}{c} - \contour{white}{\pgfmathprintnumber{\theta}}\\ - \contour{white}{\pgfmathprintnumber{\thetaopposite}} - \end{tabular} - }; -} - -\foreach \theta in {90,100,...,170} -{ - \pgfmathsetmacro{\thetaopposite}{\theta+180} - - \draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=-90,text=black] { - \textsize - \begin{tabular}{c} - \contour{white}{\pgfmathprintnumber{\theta}}\\ - \contour{white}{\pgfmathprintnumber{\thetaopposite}} - \end{tabular} - }; -}; - - -% ******************************************************************************** -% Draw the linear numbers -% ******************************************************************************** - -\pgfmathsetmacro{\labmax}{\radius-\majordivision} -\pgfmathsetmacro{\labsecond}{\majordivision+\majordivision} - -\foreach \var in {\majordivision,\labsecond,...,\labmax} -{ - \pgfmathsetmacro{\varpos}{\var*\convert/\scaleto} - - \draw[black,thick] (O) ++ (\varpos,0) -- ++ (0,\mintick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}}; - \draw[black,thick] (O) ++ (-\varpos,0) -- ++ (0,\mintick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}}; -} - - -% ******************************************************************************** -% Draw the scale number -% ******************************************************************************** - -\draw[black] (O) ++ (0,\rad/3) -- ++ (0,\rad/3) node [midway,anchor=center,sloped,text=black] {\contour{white}{\textsize $1$:\pgfmathprintnumber{\scaleto}}}; - - -\end{tikzpicture} -\end{document}