make some tweaks for colour and orientation, more proximate to joezo+steve wells 'cave survey protractor'

This commit is contained in:
echarlie 2022-07-21 11:30:07 -04:00
parent fbd2cc273e
commit 38dac147e0

View File

@ -43,7 +43,8 @@
\pgfmathsetmacro{\mindiv}{0.5*\majdiv} % size on page in cm
% Slightly reduced radii for the scale bar
\pgfmathsetmacro{\radscale}{\rad-\mindiv}
\pgfmathsetmacro{\radscale}{\rad-\majdiv}
\pgfmathsetmacro{\linscale}{\rad-\mindiv}
% Numbers for labelling
\pgfmathsetmacro{\radius}{\rad*\scaleto/\convert} % size in meters
@ -55,7 +56,7 @@
% ********************************************************************************
% Vertical lines
\foreach \var in {0,\mindiv,...,\radscale}
\foreach \var in {0,\majdiv,...,\radscale}
{
\draw[gray] (O) ++ (\var,0) -- ++ (0,\rad);
\draw[gray] (O) ++ (-\var,0) -- ++ (0,\rad);
@ -69,7 +70,7 @@
% Draw the circumcircles
% ********************************************************************************
\foreach \var in {0,\mindiv,...,\rad}
\foreach \var in {0,\majdiv,...,\rad}
{
\draw[gray] (O) ++ (\var,0) arc (0:180:\var);
}
@ -79,19 +80,24 @@
% Draw the radii
% ********************************************************************************
\foreach \theta in {10,40,...,160}
\foreach \theta in {10,50,...,140}
{
\draw[red] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale);
\draw[blue] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
}
\foreach \theta in {20,50,...,170}
\foreach \theta in {20,60,...,150}
{
\draw[blue] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale);
\draw[pink] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
}
\foreach \theta in {30,60,...,150}
\foreach \theta in {30,70,...,160}
{
\draw[black] (O) ++ (\theta:\mindiv) -- ++ (\theta:\radscale);
\draw[green] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
}
\foreach \theta in {40,80,...,170}
{
\draw[gray] (O) ++ (\theta:\majdiv) -- ++ (\theta:\radscale);
}
\foreach \theta in {5,15,...,175}
@ -99,6 +105,8 @@
\draw[black,dotted] (O) ++ (\theta:\minradii*\rad) -- ++ (\theta:\minradiiend*\rad);
}
\draw[black,thick] (O) ++ (90:0) -- ++ (90:\radscale);
% ********************************************************************************
% Draw the angular scale
@ -106,7 +114,8 @@
\foreach \theta in {1,2,...,179}
{
\draw[black,thick] (O) ++ (\theta:\rad) -- ++ (\theta:-\mintick);
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\mintick);
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:\mintick);
}
\foreach \theta in {5,10,...,175}
@ -120,17 +129,21 @@
% ********************************************************************************
\foreach \var in {0,\mindiv,...,\radscale}
\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[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);
}
%this is done in the numeric section. very weird
%
%\foreach \var in {0,\majdiv,...,\linscale}
%{
% \draw[black,thick] (O) ++ (\var,0) -- ++ (0,\majtick);
% \draw[red,thick] (O) ++ (-\var,0) -- ++ (0,\majtick);
%}
@ -139,7 +152,7 @@
% ********************************************************************************
\draw[black,thick] (O) ++ (\rad,0) arc (0:180:\rad) -- cycle;
\draw[black,thick] (O) -- ++ (0,\majtick);
%\draw[black,thick] (O) -- ++ (0,\majtick);
% ********************************************************************************
@ -150,11 +163,11 @@
{
\pgfmathsetmacro{\thetaopposite}{\theta+180}
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=90,text=black] {
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=north,near start,sloped,rotate=-90,text=black] {
\textsize
\begin{tabular}{c}
\contour{white}{\pgfmathprintnumber{\theta}}\\
\contour{white}{\pgfmathprintnumber{\thetaopposite}}
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
\end{tabular}
};
}
@ -163,11 +176,11 @@
{
\pgfmathsetmacro{\thetaopposite}{\theta+180}
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=south,near start,sloped,rotate=-90,text=black] {
\draw[black] (O) ++ (\theta:\rad) -- ++ (\theta:-\majtick) node[anchor=north,near start,sloped,rotate=90,text=black] {
\textsize
\begin{tabular}{c}
\contour{white}{\pgfmathprintnumber{\theta}}\\
\contour{white}{\pgfmathprintnumber{\thetaopposite}}
\contour{white}{\color{red}\pgfmathprintnumber{\thetaopposite}}
\end{tabular}
};
};
@ -183,11 +196,13 @@
\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[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}}};
}
\draw[black,thick] (O) ++ (0,0) -- ++ (0,\majtick) node [above=-2pt] {\contour{white}{\textsize\pgfmathprintnumber{0}}};
% ********************************************************************************
% Draw the scale number