-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUniversalPlottingSheet.tex
106 lines (88 loc) · 4.38 KB
/
UniversalPlottingSheet.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
%% First attempt at 'manually' drawing a Universal Plotting Sheet,
%% using LaTeX and tikz
%% Author: Kevin Zembower
\documentclass[tikz,border=1cm]{standalone}
\usepackage{tikz}
\tikzset{font={\fontsize{8pt}{12}\selectfont}}
\begin{document}
\begin{centering}
% Define a few constants for easy configuration
\def\radius{6.5cm} %Scale everything off of the radius
\def\onedegrad{\radius*0.975} %Distance in from radius circle to end of one-degree line
\def\fivedegrad{\radius*0.95} %Distance in from radius circle to end of 5-degree line
\def\tendegrad{\radius*0.925} %Distance in from radius circle to end of 10-degree line
\def\labelrad{\radius*0.90} %Distance in from radius circle to 10-degree label text
\def\outerlabelrad{\radius*1.0375} %Distance to outer degree label text
\begin{tikzpicture}[scale=1,
degree lines/.style={color=gray, very thin}]
\draw (0,0) circle (\radius); %Outer circle
% lines at every degree
\foreach \x in {0,...,359} \draw [degree lines] (\x:\onedegrad) -- (\x:\radius);
% lines at every 5 degrees
\foreach \x in {0,5,...,355} \draw [degree lines] (\x:\fivedegrad) -- (\x:\radius);
% labels and longer lines at every 10 degrees
\foreach \x in {0,10,...,350} {
\node[scale=1, rotate=-\x] at (360-\x+90:\labelrad) {\x};
\draw (\x:\tendegrad) -- (\x:\radius);
};
%% Draw the outer text labels, from 10-70 degrees, CW and CCX from 90 degrees:
\foreach \x in {10,20,...,70} {
\node[scale=0.75, rotate=\x] at (\x:\outerlabelrad) {\x};
\node[scale=0.75, rotate=-\x] at (-\x:\outerlabelrad) {\x};
}
%% Draw the latitude lines
\foreach \y in {-\radius*2,-\radius*1,0,\radius*1,\radius*2} {
\draw (-\radius*1.5,\y) -- (\radius*1.5,\y);
}
%% Draw the center vertical line, and scale
\draw (0, -\radius*2) -- (0, \radius*2);
\foreach \x in {-2,-1,...,1} {
%% Draw the one degree lines
\foreach \tick in {1,2,...,59} { %Don't draw on top of existing lines
\draw [degree lines] (0, {\radius*\x+(\tick*\radius/60)}) --
(\radius-\onedegrad, {\radius*\x+(\tick*\radius/60)});
}
%% Draw the 5 degree lines
\foreach \tick in {5,10,...,55} {
\draw [degree lines] (0, {\radius*\x+(\tick*\radius/60)}) --
(\radius-\fivedegrad, {\radius*\x+(\tick*\radius/60)});
}
%% Draw the 10 degree lines and numbers
\foreach \tick in {10,20,...,50} {
\draw [degree lines] (0, {\radius*\x+(\tick*\radius/60)}) --
(\radius-\tendegrad, {\radius*\x+(\tick*\radius/60)});
\node [scale=1] at (\radius-\labelrad,
{\radius*\x+(\tick*\radius/60)}) {\tick};
}
}
%% Draw the latitude scale in the bottom right-hand corner
\def\zeroy{\radius*-2}; %Set a new reference point, for 0,0.
\def\zerox{\radius*1.25};
\def\scalex{\radius/0.60}; % Width of lattitude scale. MUST BE
% equal to \radius. Divide by 0.60,
% because latitude scale is only 60
% degree wide.
\def\scaley{\scalex*0.75}; %Height of latitude scale, arbitrary
\foreach \step in {0.00,0.02,0.04,0.06,0.08,0.1,0.2,0.3,0.4,0.5,0.6} { %for each of the curved lines
\foreach \y in {0.0,0.01,...,0.69} { %for each degree in the vertical scale
\draw ({((-sin(90-\y*100))*\step*\scalex)+\zerox},{(\y*\scaley)+\zeroy}) --
({((-sin(90-(\y+0.01)*100))*\step*\scalex)+\zerox},{((\y+0.01)*\scaley)+\zeroy});
}
}
\foreach \lat in {0, 10,...,70} { %For each of the horizontal latitude lines
\draw ({(-sin(90-\lat)*.6*\scalex)+\zerox},{(\lat/100*\scaley)+\zeroy}) --
(\zerox, {(\lat/100*\scaley)+\zeroy}) node [right] {\lat};
}
\foreach \lat in {5,15,...,65} { %For each of the thinner horizontal latitude lines
\draw[very thin, gray] ({(-sin(90-\lat)*.6*\scalex)+\zerox}, {(\lat/100*\scaley)+\zeroy}) --
(\zerox,{(\lat/100*\scaley)+\zeroy});
}
\foreach \min in {0,10,...,50} { %For each minute in the latitude scale
\node [above left] at ({((-\min/10)*(\scalex/10))-(\scalex/10)+\zerox}, \zeroy) {\min};
}
%% Enter the label for where to find this file
\node [anchor=south west] at (-\radius*1.5,-\radius*2)
{\LaTeX{} and TikZ Universal Plotting Sheet v0.1};
\end{tikzpicture}
\end{centering}
\end{document}