mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-25 00:32:01 +00:00
add colour/bw switching and table/therion switching
This commit is contained in:
parent
1bb480491f
commit
c891619c7c
@ -1,5 +1,6 @@
|
||||
%\documentclass[12pt,a4paper]{article}
|
||||
\documentclass[12pt,letter]{article}
|
||||
\documentclass[12pt,a4paper]{article}
|
||||
%\documentclass[12pt,letter]{article}
|
||||
% if using letter, make margin=5mm
|
||||
|
||||
% Change the scale using the value on line 24, and the size of the divisions on line 27
|
||||
% The protractors are 4cm in radius
|
||||
@ -15,6 +16,18 @@
|
||||
|
||||
\contourlength{1.2pt}
|
||||
|
||||
% multiple styles
|
||||
% Therionfalse generates table of cotangents
|
||||
% Colourflase does what you'd expect
|
||||
\newif\ifTherion
|
||||
\newif\ifColour
|
||||
|
||||
%\Therionfalse
|
||||
\Theriontrue
|
||||
|
||||
%\Colourfalse
|
||||
\Colourtrue
|
||||
|
||||
% ********************************************************************************
|
||||
% Set the coordinates and dimensions to draw from
|
||||
% ********************************************************************************
|
||||
@ -56,6 +69,7 @@
|
||||
% Draw the foreshortening lines
|
||||
% ********************************************************************************
|
||||
|
||||
\ifTherion
|
||||
% Vertical lines
|
||||
\foreach \var in {0,\majdiv,...,\radscale}
|
||||
{
|
||||
@ -75,36 +89,52 @@
|
||||
{
|
||||
\draw[gray] (O) ++ (\var,0) arc (0:180:\var);
|
||||
}
|
||||
\fi
|
||||
|
||||
|
||||
% ********************************************************************************
|
||||
% Draw the radii
|
||||
% ********************************************************************************
|
||||
|
||||
\foreach \theta in {10,50,...,140}
|
||||
%
|
||||
% note these colours are duplicated from the Steve Wells and Joe Zokaties
|
||||
% ``Cave Survey protractor'' previously sold % by american caving vendor IMO.
|
||||
% Because of the black at 90, they are not evenly divided.
|
||||
|
||||
\ifColour
|
||||
\foreach \theta in {10,50,100,140}
|
||||
{
|
||||
\draw[blue] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
|
||||
}
|
||||
|
||||
\foreach \theta in {20,60,...,150}
|
||||
\foreach \theta in {20,60,110,150}
|
||||
{
|
||||
\draw[pink] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
|
||||
}
|
||||
|
||||
\foreach \theta in {30,70,...,160}
|
||||
\foreach \theta in {30,70,120,160}
|
||||
{
|
||||
\draw[green] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
|
||||
}
|
||||
|
||||
\foreach \theta in {40,80,...,170}
|
||||
\foreach \theta in {40,80,130,170}
|
||||
{
|
||||
\draw[gray] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
|
||||
}
|
||||
|
||||
\else
|
||||
\foreach \theta in {10,20,...,170}
|
||||
{
|
||||
\draw[black] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
|
||||
}
|
||||
\fi
|
||||
|
||||
\ifTherion
|
||||
\foreach \theta in {5,15,...,175}
|
||||
{
|
||||
\draw[black,dotted] (O) ++ (\theta:\minradii*\rad) -- ++ (\theta:\minradiiend*\rad);
|
||||
}
|
||||
\fi
|
||||
|
||||
\draw[black,thick] (O) ++ (90:0) -- ++ (90:\radscale);
|
||||
|
||||
@ -115,8 +145,8 @@
|
||||
|
||||
\foreach \theta in {1,2,...,179}
|
||||
{
|
||||
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\mintick);
|
||||
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:\mintick);
|
||||
% draw ticks from slightly outside of circle
|
||||
\draw[black] (O) ++ (\theta:\rad+\mintick) -- ++ (\theta:-2*\mintick);
|
||||
}
|
||||
|
||||
\foreach \theta in {5,10,...,175}
|
||||
@ -132,10 +162,13 @@
|
||||
|
||||
\foreach \var in {0,\mindiv,...,\linscale}
|
||||
{
|
||||
\draw[red,thick] (O) ++ (-\var,0) -- ++ (0,\mintick);
|
||||
\draw[red,thick] (O) ++ (-\var,0) -- ++ (0,-\mintick);
|
||||
\draw[black,thick] (O) ++ (\var,0) -- ++ (0,-\mintick);
|
||||
\draw[black,thick] (O) ++ (\var,0) -- ++ (0,\mintick);
|
||||
% draw ticks from slightly outside of circle
|
||||
\ifColour
|
||||
\draw[red,thick] (O) ++ (-\var,-\mintick) -- ++ (0,2*\mintick);
|
||||
\else
|
||||
\draw[black,thick] (O) ++ (-\var,-\mintick) -- ++ (0,2*\mintick);
|
||||
\fi
|
||||
\draw[black,thick] (O) ++ (\var,-\mintick) -- ++ (0,2*\mintick);
|
||||
}
|
||||
|
||||
%this is done in the numeric section. very weird
|
||||
@ -160,6 +193,10 @@
|
||||
% Draw the angle numbers
|
||||
% ********************************************************************************
|
||||
|
||||
%
|
||||
% note: we offset these in order to use a larger font and maintain legibility
|
||||
%
|
||||
|
||||
\foreach \theta in {10,30,...,70}
|
||||
{
|
||||
\pgfmathsetmacro{\thetaopposite}{\theta+180}
|
||||
@ -168,7 +205,11 @@
|
||||
\textsize
|
||||
\begin{tabular}{c}
|
||||
\contour{white}{\pgfmathprintnumber{\theta}}\\
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\ifColour
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\else
|
||||
\contour{white}{\pgfmathprintnumber{\thetaopposite}}
|
||||
\fi
|
||||
\end{tabular}
|
||||
};
|
||||
}
|
||||
@ -181,7 +222,11 @@
|
||||
\textsize
|
||||
\begin{tabular}{c}
|
||||
\contour{white}{\pgfmathprintnumber{\theta}}\\
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\ifColour
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\else
|
||||
\contour{white}{\pgfmathprintnumber{\thetaopposite}}
|
||||
\fi
|
||||
\end{tabular}
|
||||
};
|
||||
}
|
||||
@ -194,7 +239,11 @@
|
||||
\textsize
|
||||
\begin{tabular}{c}
|
||||
\contour{white}{\pgfmathprintnumber{\theta}}\\
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\ifColour
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\else
|
||||
\contour{white}{\pgfmathprintnumber{\thetaopposite}}
|
||||
\fi
|
||||
\end{tabular}
|
||||
};
|
||||
};
|
||||
@ -207,7 +256,11 @@
|
||||
\textsize
|
||||
\begin{tabular}{c}
|
||||
\contour{white}{\pgfmathprintnumber{\theta}}\\
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\ifColour
|
||||
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
|
||||
\else
|
||||
\contour{white}{\pgfmathprintnumber{\thetaopposite}}
|
||||
\fi
|
||||
\end{tabular}
|
||||
};
|
||||
};
|
||||
@ -219,6 +272,7 @@
|
||||
% ********************************************************************************
|
||||
|
||||
%\pgfmathsetmacro{\labmax}{\radius-\majordivision}
|
||||
% FIXME this should be computable. need to figure out height of table from above section!
|
||||
\pgfmathsetmacro{\labmax}{7} %hardcode as 7 so things fit right
|
||||
\pgfmathsetmacro{\labsecond}{\majordivision+\majordivision}
|
||||
|
||||
@ -228,7 +282,11 @@
|
||||
|
||||
|
||||
\draw[black,thick] (O) ++ (\varpos,0) -- ++ (0,\majtick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}};
|
||||
\draw[red,thick] (O) ++ (-\varpos,0) -- ++ (0,\majtick) node [above=-2pt] {\contour{white}{\textsize\color{red}\pgfmathprintnumber{\var}}};
|
||||
\ifColour
|
||||
\draw[red,thick] (O) ++ (-\varpos,0) -- ++ (0,\majtick) node [above=-2pt] {\contour{white}{\textsize\color{red}\pgfmathprintnumber{\var}}};
|
||||
\else
|
||||
\draw[black,thick] (O) ++ (-\varpos,0) -- ++ (0,\majtick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{\var}}};
|
||||
\fi
|
||||
}
|
||||
|
||||
\draw[black,thick] (O) ++ (0,0) -- ++ (0,\majtick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{0}}};
|
||||
@ -237,8 +295,46 @@
|
||||
% 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}}};
|
||||
\ifTherion
|
||||
\draw[black] (O) ++ (0,\rad/3) -- ++ (0,\rad/3) node [midway,anchor=center,sloped,text=black] {\contour{white}{\tiny $1$:\pgfmathprintnumber{\scaleto}}};
|
||||
\else
|
||||
\draw[black] (O) ++ (0,\rad/8) -- ++ (0,\rad/8) node [midway,anchor=center,text=black] {\contour{white}{\tiny $1$:\pgfmathprintnumber{\scaleto}}};
|
||||
|
||||
% Draw a table of conversions for non-therion
|
||||
|
||||
\renewcommand{\arraystretch}{0.1}
|
||||
\draw[black] (O) ++ (0,\rad/3) -- ++ (0,\rad/3) node [midway,anchor=center,sloped,rotate=180,text=black]
|
||||
{
|
||||
\tiny
|
||||
\setlength{\tabcolsep}{1pt}
|
||||
\begin{tabular}{cl}
|
||||
\contour{white}{0} & --- \\
|
||||
& \contour{white}{1.0} \\
|
||||
\contour{white}{18} & --- \\
|
||||
& \contour{white}{0.9} \\
|
||||
\contour{white}{32} & --- \\
|
||||
& \contour{white}{0.8} \\
|
||||
\contour{white}{41} & --- \\
|
||||
& \contour{white}{0.7} \\
|
||||
\contour{white}{50} & --- \\
|
||||
& \contour{white}{0.6} \\
|
||||
\contour{white}{57} & ---\\
|
||||
& \contour{white}{0.5} \\
|
||||
\contour{white}{63} & ---\\
|
||||
& \contour{white}{0.4} \\
|
||||
\contour{white}{70} & --- \\
|
||||
& \contour{white}{0.3} \\
|
||||
\contour{white}{76} & ---\\
|
||||
& \contour{white}{0.2} \\
|
||||
\contour{white}{81} & ---\\
|
||||
& \contour{white}{0.1} \\
|
||||
\contour{white}{87} & ---
|
||||
\end{tabular}
|
||||
};
|
||||
%\draw[clear] (O) ++ (0,\rad/3) -- ++ (0,\rad/3) node [midway,anchor=center,sloped,rotate=180,text=black]
|
||||
|
||||
|
||||
\fi
|
||||
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user