-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestmimoshapes.tex
More file actions
288 lines (241 loc) · 10.1 KB
/
testmimoshapes.tex
File metadata and controls
288 lines (241 loc) · 10.1 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
\documentclass[a4]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc} % Use this if the file is encoded with utf-8
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{tikz} % Create graphics in Latex
\input{mimoshapes}
\begin{document}
\thispagestyle{empty}
\usetikzlibrary{positioning}
\begin{tikzpicture}[every node/.append style={scale=1}]
\draw[help lines] (-0.5,-7.5) grid (12,7.5);
% Coordinate system origin
\path (0,0) coordinate (origin);
\draw[fill=red] (origin) circle (1pt);
\draw[gray!40!white] (origin) node[rotate=60] {origin};
% If I draw the node at the origin some bugs could not be seem
\path (1.5,6) coordinate (mimobox2pos);
\path (1.5,3) coordinate (mimo1pos);
\path (1.5,0.0) coordinate (mimo2pos);
\path (1.5,-3) coordinate (mimo3pos);
\path (1.5,-6.0) coordinate (mimoindpos);
\path (10,0.0) coordinate (mimo2biggerpos);
% xxxxxxxxxx TRY CHANGING THE VALUES HERE TO SEE THE xxxxxxxxxxxxxxxxxxxx
\tikzset{test mimo node/.style={fill=blue!30,draw,thick,
% Change the numbers and see the effect
antenna offset=0.3cm, %0.3
minimum width=1.5cm,
minimum height=2cm,
antenna base height=0.2cm,
antenna side=0.4cm,
antenna yshift=0.3cm
}}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Draw the nodes xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\def\txrxsep{4cm}
% Nodes with one antenna
\draw (mimo1pos) node[test mimo node,mimoone] (mimo1txnode) {\pgftypesetversion};
\node[test mimo node,mimoone,right=\txrxsep of mimo1txnode,left antennas] (mimo1rxnode) {\pgftypesetversion};
\path (mimo1txnode) -- node[fill=white] {mimoone shape} (mimo1rxnode);
% Nodes with two antennas
\draw (mimo2pos) node[test mimo node,mimotwo] (mimo2txnode) {\pgftypesetversion};
\node[test mimo node,mimotwo,right=\txrxsep of mimo2txnode,left antennas] (mimo2rxnode) {\pgftypesetversion};
\path (mimo2txnode) -- node[fill=white] {mimotwo shape} (mimo2rxnode);
% Nodes with tree antennas
\draw (mimo3pos) node[test mimo node,mimothree] (mimo3txnode) {\pgftypesetversion};
\node[test mimo node,right=\txrxsep of mimo3txnode,mimothree,left antennas] (mimo3rxnode) {\pgftypesetversion};
\path (mimo3txnode) -- node[fill=white] {mimothree shape} (mimo3rxnode);
% Nodes with many antennas
\draw (mimoindpos) node[draw,test mimo node,mimoind] (mimoindtxnode) {\pgftypesetversion};
\draw node[right=\txrxsep of mimoindtxnode,draw,test mimo node,mimoind,left antennas] (mimoindrxnode) {\pgftypesetversion};
\path (mimoindtxnode) -- node[fill=white] {mimoind shape} (mimoindrxnode);
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Test all anchors in the mimoone Shape xxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\foreach \ancora in {
north,
east,
south,
west,
north east,
north west,
south east,
south west,
text,
% base,
first antenna base start,
first antenna base end,
first antenna,
% A,
% B,
center} % text is the same as the center anchor
{
\draw[fill=green] (mimo1txnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
\draw[fill=green] (mimo1rxnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Test all anchors in the mimotwo Shape xxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\foreach \ancora in {
north,
east,
south,
west,
north east,
north west,
south east,
south west,
text,
% base,
first antenna base start,
second antenna base start,
first antenna base end,
second antenna base end,
first antenna,
second antenna,
% A,
% B,
center} % text is the same as the center anchor
{
\draw[fill=green] (mimo2txnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
\draw[fill=green] (mimo2rxnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Test all anchors in the mimothree Shape xxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\foreach \ancora in {
north,
east,
south,
west,
north east,
north west,
south east,
south west,
text,
% base,
first antenna base start,
second antenna base start,
third antenna base start,
first antenna base end,
second antenna base end,
third antenna base end,
first antenna,
second antenna,
third antenna,
% A,
% B,
% C,
center} % text is the same as the center anchor
{
\draw[fill=green] (mimo3txnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
\draw[fill=green] (mimo3rxnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx mimo2bigger xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% Test the antenna positions when the node has a larger height
\draw[fill=red] (mimo2biggerpos) circle (2pt);
\draw (mimo2biggerpos) node[test mimo node, mimothree, minimum height=4cm] (mimo2biggertxnode) {\pgftypesetversion};
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Test all anchors in the mimoind Shape xxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\foreach \ancora in {
north,
east,
south,
west,
north east,
north west,
south east,
south west,
text,
% base,
first antenna base start,
second antenna base start,
third antenna base start,
first antenna base end,
second antenna base end,
third antenna base end,
first antenna,
second antenna,
third antenna,
% A,
% B,
% C,
center} % text is the same as the center anchor
{
\draw[fill=green] (mimoindtxnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
\draw[fill=green] (mimoindrxnode.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Test the angle anchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\foreach \angulo in {0,15,...,360}
{
\draw[fill=blue] (mimo2txnode.\angulo) circle (1pt);
\draw (mimo2txnode.center) -- ++(\angulo:1.5cm);
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxx Test all anchors in the boxtwo and boxthree shapes xxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\draw (mimobox2pos) node[test mimo node,boxtwo,circle radius=3mm] (mimobox2) {\pgftypesetversion};
\node[test mimo node,right=\txrxsep of mimobox2,boxthree,circle radius=1.5mm] (mimobox3) {\pgftypesetversion};
\node[right, xshift=3mm,fill=white] at (mimobox2.east) {boxtwo shape};
\node[right, xshift=3mm,fill=white] at (mimobox3.east) {boxthree shape};
% Test all anchors in the Shape
\foreach \ancora in {
north,
east,
south,
west,
north east,
north west,
south east,
south west,
text,
% base,
A,
B,
center} % text is the same as the center anchor
{
\draw[fill=green] (mimobox2.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
\draw[fill=green] (mimobox3.\ancora) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{\ancora}};
}
\draw[fill=green] (mimobox3.C) circle (1pt) node[scale=0.8,red!50!black,rotate=45] {\tiny{C}};
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Bounding Box of this whole tikzpicture xxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\draw[help lines] (current bounding box.south west) rectangle (current bounding box.north east);
\foreach \ancora in {north,east,west,south,north east,north west,south east,south west}
{
\draw[overlay,fill=red!50!black] (current bounding box.\ancora) circle (1pt) node[blue,rotate=45] {\tiny{\ancora}};
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxx END xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\end{tikzpicture}
\end{document}
% Used by Emacs
%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: t
%%% End: