-
Notifications
You must be signed in to change notification settings - Fork 45
/
rose.tex
73 lines (70 loc) · 2.98 KB
/
rose.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
% Draw a rose with TikZ
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\usepackage{tikz}
\usetikzlibrary{patterns}
\PreviewEnvironment{tikzpicture}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\radius{1}
\def\ticklength{.3}
\def\labelshift{0.35}
\def\overlap{.075}
\def\projangle{17}
\def\angleshift{2}
\begin{tikzpicture}[scale=1.6]
\scriptsize
%% Fill CenterScan
\pattern [pattern=checkerboard light gray] (1,0) -- (3,0) arc (0:180:3*\radius) -- (-1,0) arc (180:0:\radius);
\fill [color=red,nearly transparent] (1,0) -- (3,0) arc (0:180:3*\radius) -- (-1+\overlap,0) arc (180:0:\radius-\overlap);
%% Fill RingScan 1
\fill [color=green,nearly transparent] (0,0) circle (\radius+\overlap);
%% Fill RingScan 2
\pattern [pattern=horizontal lines gray] (1,0) -- (3,0) arc (0:-180:3*\radius) -- (-1,0) arc (-180:0:\radius);
\fill [color=blue,nearly transparent] (1,0) -- (3,0) arc (0:-180:3*\radius) -- (-1+\overlap,0) arc (-180:0:\radius-\overlap);
%% Projections
\draw [ultra thick,color=red](\projangle:\radius-\overlap) -- (\projangle:3*\radius);
\draw [ultra thick,color=green](\projangle+180+\angleshift:\radius+\overlap) -- (\projangle+\angleshift:\radius+\overlap);
\draw [ultra thick,color=blue](\projangle+180:3*\radius) -- (\projangle+180:\radius-\overlap);
%% inner ring
% ring
\draw (0,0) circle (\radius);
% projections
\foreach \angle in {0,20,...,181}
\draw (\angle:-\radius) -- (\angle:\radius+\ticklength);
\foreach \angle in {0,5,...,179}
{
% inner ticks
\draw (\angle:-.5*\ticklength) -- (\angle:.5*\ticklength);
% % median ticks
% \draw [dotted] (\angle:.5*\ticklength) -- (\angle:\radius-.5*\ticklength);
% \draw [dotted] (180+\angle:.5*\ticklength) -- (180+\angle:\radius);
% outer ticks
\draw (\angle:\radius-.5*\ticklength) -- (\angle:\radius);
}
% labels
\foreach \angle / \label in {0/1,30/200,60/500,90/750,120/1000,150/1250,180/1500}
\draw (\angle:\radius-\labelshift) node {\label}; % {\textsf{\label}};
%% outer ring
% circle
\draw (0,0) circle (3*\radius);
% projections
\foreach \angle in {0,20,...,719}
\draw (.5*\angle:\radius) -- (.5*\angle:3*\radius+\ticklength);
\foreach \angle in {0,2.5,...,359}
{
% inner ticks
\draw (\angle:3*\radius-.5*\ticklength) -- (\angle:3*\radius+.5*\ticklength);
% % median ticks
% \draw [dotted] (\angle:\radius+.5*\ticklength) -- (\angle:3*\radius-.5*\ticklength);
% outer ticks
\draw (\angle:\radius) -- (\angle:\radius+.5*\ticklength);
}
% labels
\foreach \angle / \label in {2/1 and,15/200,30/500,45/750,60/1000,75/1250,90/1500,105/1750,120/2000,135/2250,150/2500,165/2750,178/3000}
\draw (\angle:3*\radius+\labelshift) node {\label};
\foreach \angle / \label in {2/and 1,15/200,30/500,45/750,60/1000,75/1250,90/1500,105/1750,120/2000,135/2250,150/2500,165/2750,178/3000}
\draw (180+\angle:3*\radius+\labelshift) node {\label};
\end{tikzpicture}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}