spider.tex
2.01 KB
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
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\newcommand{\D}{5} % number of dimensions (config option)
\newcommand{\U}{5} % number of scale units (config option)
\newdimen\R % maximal diagram radius (config option)
\R=5cm
\newdimen\L % radius to put dimension labels (config option)
\L=5.2cm
\newcommand{\A}{360/\D} % calculated angle between dimension axes
\newcommand{\B}{90-\A} % starting angle (config option)
\begin{tikzpicture}
\path (0:0cm) coordinate (O); % define coordinate for origin
\foreach \X in {1,...,\D}{
\draw (\X*\A+\B:0) -- (\X*\A+\B:\R);
}
\foreach \Y in {0,...,\U}{
\foreach \X in {1,...,\D}{
\path (\X*\A+\B:\Y*\R/\U) coordinate (D\X-\Y);
\fill (D\X-\Y) circle (1pt);
}
\draw [opacity=0.3] (\B:\Y*\R/\U) \foreach \X in {1,...,\D}{
-- (\X*\A+\B:\Y*\R/\U)
} -- cycle;
}
%\path (1*\A+\B:\L) node[anchor=south] (L1) {Contains};
%\path (2*\A+\B:\L) node[anchor=east] (L2) {DistanceIn};
%\path (3*\A+\B:\L) node[anchor=north] (L3) {DistanceOut};
%\path (4*\A+\B:\L) node[anchor=north] (L4) {RayCastIn};
%\path (5*\A+\B:\L) node[anchor=west] (L5) {RayCastOut};
\draw [color=red, fill=red, line width=1.5pt,opacity=0.5]
(D1-3) -- (D2-5) -- (D3-2) -- (D4-4) -- (D5-1) -- cycle;
\draw [color=blue, fill=blue, line width=1.5pt,opacity=0.5]
(D1-1) -- (D2-3) -- (D3-4) -- (D4-2) -- (D5-4) -- cycle;
\draw [color=green, fill=green, line width=1.5pt,opacity=0.5]
(D1-3) -- (D2-4) -- (D3-2) -- (D4-3) -- (D5-2) -- cycle;
\draw [color=orange, fill=orange, line width=1.5pt,opacity=0.5]
(D1-4) -- (D2-1) -- (D3-3) -- (D4-1) -- (D5-3) -- cycle;
%\draw [fill=red, opacity=0.5] (\R,\R) circle (2pt) node[anchor=west] {Geant4};
%\draw [fill=blue, opacity=0.5] (\R,\R-1em) circle (2pt) node[anchor=west] {ROOT};
%\draw [fill=blue, opacity=0.5] (\R,\R-1em) circle (2pt) node[anchor=west] {ROOT};
%\draw [fill=blue, opacity=0.5] (\R,\R-1em) circle (2pt) node[anchor=west] {ROOT};
\end{tikzpicture}
\end{document}